Border in VBA klappt nicht
01.04.2005 11:12:21
Eve
Ich hab ein kleines Probelm, ich möchte per VBA einen Rahmen setzen,
doch irgendwie funktioniert das nicht.
Hier ein Teil aus dem Code - hoffe, jemand kann mir sagen,
was ich falsch mache.
For n = 6 To 16
wksZ.Cells(lRow + 1, 1) = "Gesamttotal"
wksZ.Cells(lRow + 1, 1).Font.Bold = True
wksZ.Cells(lRow + 1, 1).Font.Italic = True
wksZ.Cells(lRow + 1, 1).Font.ColorIndex = 2
wksZ.Cells(lRow + 1, 12).FormulaR1C1 = "=IF(RC[-1]=0,0,RC[-1]/RC[-5])"
wksZ.Cells(lRow + 1, n).Interior.ColorIndex = 1
wksZ.Cells(lRow + 1, n).Font.ColorIndex = 2
wksZ.Cells(lRow + 1, n).Font.Bold = True
wksZ.Cells(lRow + 1, n).Font.Italic = True
wksZ.Cells(lRow + 1, n).NumberFormat = "#,##0.00;;""""-"
wksZ.Cells(lRow + 1, n).Borders.ColorIndex = 20
wksZ.Cells(lRow + 1, n).Borders.LineStyle = xlContinuous
Next n
Vielen Dank für Eure Hilfe
Gruss Eve