Rahmen um Zellen per Makro
22.07.2003 10:08:28
streuner
Hab mir ein Makro aufgeziechnet, dass mir folgenden Code ausspuckt, damit ich nen Rahmen um jede Zelle in einem bestimmten Bereich kriege:
Range("D3:D31").Select
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
Wenn ich den Code jedoch ausführe bekomme ich bei .LineStyle = xlContinuos (xlInsideVertical) jedesmal ne Fehlermeldung...mmmh! Woran kann das liegen?
Hab auch in der Recherche ein bißchen gesucht und ein paar Beispiele gefunden, aber nicht das was ich suche. Hat jemand einen Tipp?
Dank euch.
MFG Streuner