Re: Fehler bei .Range
10.12.2002 13:50:21
Philipp
Und wo war jetzt der Fehler?Sub S7_Schleife()
Dim Sirow As Integer
Dim zähl As Integer
Dim var1 As Integer
zähl = 14
var1 = 1
y1 = Sheets(5).Cells(1, 1)
y2 = Sheets(5).Cells(1, 2)
For Sirow = 1 To 500
With Worksheets(3)
.Cells(zähl, 1) = "NETWORK"
.Cells(zähl, 1).Offset(1, 0) = "TITEL=Meldung:"
.Cells(zähl, 2).Offset(1, 0) = y1 + 1
.Cells(zähl, 3).Offset(1, 0) = "-" & y1 + 8
.Cells(zähl, 4).Offset(1, 0) = "/Erstwertmeldung:"
.Cells(zähl, 5).Offset(1, 0) = var1
.Cells(zähl, 6).Offset(1, 0) = "-" & var1 + 7
.Range(Cells((zähl + 2), 1), Cells((zähl + 9), 1)) = "UN"
.Range(Cells((zähl + 2), 1), Cells((zähl + 9), 1)).HorizontalAlignment = xlCenter
.Range(Cells((zähl + 2), 3), Cells((zähl + 9), 3)) = ";"
.Range(Cells((zähl + 2), 3), Cells((zähl + 9), 3)).HorizontalAlignment = xlCenter
.Range(Cells((zähl + 2), 4), Cells((zähl + 9), 4)) = "="
.Range(Cells((zähl + 2), 4), Cells((zähl + 9), 4)).HorizontalAlignment = xlCenter
.Range(Cells((zähl + 2), 6), Cells((zähl + 9), 6)) = ";"
.Range(Cells((zähl + 2), 6), Cells((zähl + 9), 6)).HorizontalAlignment = xlCenter
End With
var1 = var1 + 8
y1 = y1 + 8
zähl = zähl + 10
Next Sirow
End Sub