Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the length of the return value from the inputbox is zero, nothing was
entered or Cancel was clicked: Sub AAAAAA() Dim retval retval = InputBox("Enter something", "My title", "XYZ") If Len(retval) = 0 Then Exit Sub MsgBox "Didn't cancel; entered something" End Sub Hope this helps, Hutch "DDawson" wrote: I have a button on the workbook that calls up a macro that in turn displays an inputbox type userform. I can't get the cancel button to cancel out of the macro, i.e. the macro still runs. How do I stop the macro from running when I click cancel? Dylan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cancel Out of UserForm Return Focus | Excel Programming | |||
Userform Cancel | Excel Programming | |||
userform cancel button | Excel Programming | |||
Cancel a Procedure through a Userform | Excel Programming | |||
Cancel Button on Userform | Excel Programming |