vbCancel
Sub test()
Dim vNumber
Dim dNumber As Double
vNumber = Application.InputBox(Prompt:="Put a number in the box",
Type:=1)
If vNumber = "False" Then
Exit Sub
Else
dNumber = Val(vNumber)
MsgBox dNumber
End If
End Sub
RBS
"Mike" wrote in message
...
On an inputbox, I am asking the user to enter a number, and there is an OK
and a Cancel. I want it to exit the sub if the user hits Cancel, even if
he
has already typed something in the box.
|