Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXIT SUB UPON VBCANCEL | Excel Discussion (Misc queries) | |||
vbCancel | Excel Programming | |||
What type is vbCancel? | Excel Programming | |||
vbCancel | Excel Programming |