Wer weiss rat?
11.10.2004 08:43:15
Martin
Ich habe von UDO folgen den Quellcode bekommen und habe ihn ein wenig verändert
Sub Werte()
Dim i As Integer, n1 As Integer, n2 As Integer
n1 = 2: n2 = n1 + 25
For i = 1 To Range("K1").Value
With Worksheets("Parameter")
.Range(Cells(n1, 9), Cells(n2, 9)).Copy Destination:=Worksheets("Page_" & i).Range("A6")
.Range(Cells(n1, 10), Cells(n2, 10)).Copy Destination:=Worksheets("Page_" & i).Range("B6")
.Range(Cells(n1, 6), Cells(n2, 6)).Copy Destination:=Worksheets("Page_" & i).Range("C6")
.Range(Cells(n1, 7), Cells(n2, 7)).Copy Destination:=Worksheets("Page_" & i).Range("D6")
.Range(Cells(n1, 2), Cells(n2, 2)).Copy Destination:=Worksheets("Page_" & i).Range("E6")
.Range(Cells(n1, 3), Cells(n2, 3)).Copy Destination:=Worksheets("Page_" & i).Range("F6")
.Range(Cells(n1, 4), Cells(n2, 4)).Copy Destination:=Worksheets("Page_" & i).Range("G6")
.Range(Cells(n1, 5), Cells(n2, 5)).Copy Destination:=Worksheets("Page_" & i).Range("H6")
.Range(Cells(n1, 1), Cells(n2, 1)).Copy Destination:=Worksheets("Page_" & i).Range("I6")
.Range(Cells(n1, 8), Cells(n2, 8)).Copy Destination:=Worksheets("Page_" & i).Range("J6")
End With
n1 = n1 + 26: n2 = n1 + 25
Next i
End Sub
Er funktioniert auch nun mein problem in der zelle K1 ermittel ich die anzahl der Blätter die ich einfüge Leider kommen da aber auch komma zahlen Raus.
K1 Verwende ich auch nun um die werte, auf die einzellnen blätter zu verteilen das funktioniert biss zur komma stelle dann hört das programm auf und die fehlenden paar Werte werden nicht übertragen
Das darf nartürlich nicht sein!
Dank im Vorraus
Gruß sagt Martin