AW: RE: Klappt nicht
10.05.2005 17:54:56
Rolf
Hallo Rudi
Ich schildere meine atwas komlexer:
Ich kopiere in Sheets("Kanalscheine neu")ein oder mehre Namen von Zelle 2 bis 8
(Range(Cells(ActiveCell.Row, 2), Cells(ActiveCell.Row, 8))
Jetzt muss ich alle beschrifteten Namen (!) in ein neues Sheets("Kanalscheine bestellt")zuerst kopieren, unten dran hängen und im alten löschen.
Sub Kanalscheine_neu_Kanal_bestellt_kopieren()
Dim Loletzte As Long
With Sheets("Kanalscheine bestellt")
Sheets("Kanalscheine bestellt").Unprotect
Sheets("Kanalscheine neu").Unprotect
If Range("B130") = "" Then
Loletzte = .Range("b130").End(xlUp).Row
ActiveSheet.Unprotect
'Selection.Copy Destination:=.Cells(Loletzte + 1, 2)
'Selection.ClearContents
Selection.EntireRow.Copy Destination:=.Cells(Loletzte + 1, 2)
Selection.EntireRow.ClearContents
Range(Cells(ActiveCell.Row, 2), Cells(ActiveCell.Row, 8)).ClearContents
ActiveSheet.Protect
Else
MsgBox "keine Zelle mehr frei"
End If
End With
Sheets("Kanalscheine bestellt").Select
ActiveCell.Select
Sheets("Kanalscheine bestellt").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Kanalscheine neu").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Gruss Rolf K.