Re: If ......then.....else
02.12.2002 16:33:12
Sonja
Das haut nicht ganz hin jetzt fügt er mir das immer in spalte 57 ein und ich find den Fehler nichtSub AutoForm1_BeiKlick()
Dim i As Integer
If Selection Is Nothing Then
Exit Sub
Else
Selection.Copy
End If
With Worksheets(Worksheets.Count)
If ActiveWorkbook.Sheets.Count > 1 Then
For i = 9 To 55
'...mach was...
Next i
Else
For i = 23 To 50
'...mach was anderes...
Next i
End If
If .Cells(i, 4).Text = "" And .Cells(i + 1, 4).Text = "" Then
.Cells(i + 1, 3).PasteSpecial
Exit Sub
End If
MsgBox "Kein Platz zum einfügen"
End With
End Sub