Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am just wondering how to stop this from happening.
I have a series of question on a inputbox and when i click the cancel button it just goes to the next one in line. How do I get excel to go back to the userform called "main" when either the cancel or the x button is pressed? Also will this work on a messagebox as well? Thanks in advance Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greg,
You need to check the return value. e.g. If MsgBox("Is this [Some Value] correct ?", vbYesNoCancel) = vbCancel Then With Input boxes, it depends which you are using. According to Help : 1 - VBA.InputBox Function, "If the user clicks Cancel, the function returns a zero-length string ("")." 2 - Application.InputBox Method, "If you click the Cancel button, InputBox returns False." NickHK "Greg" wrote in message ... I am just wondering how to stop this from happening. I have a series of question on a inputbox and when i click the cancel button it just goes to the next one in line. How do I get excel to go back to the userform called "main" when either the cancel or the x button is pressed? Also will this work on a messagebox as well? Thanks in advance Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I capture CANCEL on an Inputbox? | Excel Programming | |||
InputBox - cancel button | Excel Programming | |||
InputBox Function & Cancel | Excel Programming | |||
Inputbox and cancel button | Excel Programming | |||
Cancel button in Inputbox method | Excel Programming |