Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 349
- Office Version
- 2003 or older
- Platform
- Windows
I am capturing a value using a InputBox command. The problem is that if the input is 0, the input box returns FALSE and if I press cancel it still returns FALSE as output but with Runtime error 13, Type mismatch. My code for cancel is working because of both outputs being FALSE.
How to go back to GetM in case of a Cancel button?
How to go back to GetM in case of a Cancel button?
Code:
GetM:
M = Application.InputBox("Method: 0, 1; (Default=0)", "Input", False, , , , , 4)
If M = False Then
MsgBox "Cancel button clicked, Input Box will close.", , "Cancel was clicked."
Range("A1").Select
Exit Sub
ElseIf M = Empty Then GoTo GetM
Else
End If