Code
12.03.2009 11:45:19
leo
DANKE!! gruß leo
---------------------------------------------------------------------------------------------------------------------------------
Private Sub CommandButton1_Click()
Dim zeile
zeile = TextBox1.Value
Cells(zeile, 3).EntireRow.Insert Shift:=xlDown
Rows(zeile - 1).Copy Destination:=Cells(zeile, 1)
Range("D" & zeile & ":E" & zeile).Select
Selection.AutoFill Destination:=Range("D" & zeile & ":E" & Cells(Rows.Count, 5).End(xlUp). _
Row), Type:=xlFillDefault
Cells(zeile, 3) = TextBox2.Value
End Sub
-----------------------------------------------------------------------------------------------------------------------------------
Private Sub CommandButton1_Click()
Dim zeile As Long, Wks As Worksheet
zeile = TextBox1.Value
For Each Wks In Worksheets
With Wks
.Cells(zeile, 3).EntireRow.Insert Shift:=xlDown
.Rows(zeile - 1).Copy Destination:=.Cells(zeile, 1)
.Range("D" & zeile & ":E" & zeile).AutoFill _
Destination:=.Range("D" & zeile & ":E" & .Cells(Rows.Count, 5).End(xlUp).Row), Type:= _
xlFillDefault
.Cells(zeile, 3) = TextBox2.Value
End With
Next
End Sub
-----------------------------------------------------------------------------------------------------------------------------------