Habe in einem Makro mehre InputBoxen.
Gibt es eine Möglichkeit das das Makro abbricht wenn ich auf Abbrechen in der InputBox klicke und nicht NULL schreibt?
Gruß
Christian
Sub Test()
'von Nepumuk
Dim Eingabe As Variant
Eingabe = InputBox("Eingabe")
If StrPtr(Eingabe) = 0 Then
MsgBox "Abgebrochen"
Else
If Len(Eingabe) <> 0 Then
MsgBox "Ihre Eingabe: " & Eingabe
Else
MsgBox "Keine Eingabe"
End If
End If
End Sub
Sub test()
Dim xxx As String
xxx = InputBox("Gib mal was ein: ")
If xxx = "" Then Exit Sub
'Hier der Code für den normalen weiteren Ablauf des Makros...
'z.B.
Cells(1, 1) = xxx
End Sub