alle Zellen mit Rahmen versehen
27.08.2008 11:14:00
Walter
habe mal dieses Makro, zwecks Rahmen um jede Zelle, aufgezeichnet.
Das letzte "Stück" mußte ich "rausnehmen" war abbruch.
Kann man dieses Makro auch irgendwie abkürzen ?
z = Range("BQ3").End(xlDown).Row
ActiveSheet.Range(Cells(4, 66), Cells(z, 96)).Select
'-------------- hier die Zellenformatierung ---------------
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
'With Selection.Borders(xlInsideHorizontal)
' .LineStyle = xlContinuous
' .Weight = xlThin
' .ColorIndex = xlAutomatic
' End With
'----------------------------------------------------------
mfg walter mb