Markierung weg
07.04.2006 19:34:09
Philipp
Habe folgenden Code, der funktioniert. Er macht um alle Zellen wieder einen schwarzen Rahmen. Nachdem er durchgelaufen ist, bleibt aber das die ganze Tabelle markiert. Wie kann ich diese Markierung abschalten.
Call NEW_ROW_MAX
COL_MAX = Worksheets(sheetname).UsedRange.Columns.Count
Range(Cells(1, 1), Cells(NEW_ROW_MAX, COL_MAX)).Select
Application.CommandBars("Borders").Visible = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Application.ScreenUpdating = False
Danke
Philipp