Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the code fragment below, when I push the cancel button in response to the
inputbox, I get a type mismatch error. What type is vbCancel? Dim myDate as String Do myDate = InputBox("Please enter your name.") If myDate = vbCancel Then Exit Sub ElseIf myDate = "" Then MsgBox ("You didn't enter anything. Please try again.") End If Loop While myDate = "" In the same macro, I have these similar lines which work OK: Dim myCheck as String mycheck = MsgBox("Proceed?", vbYesNo) If myCheck = vbNo Then Exit Sub End If Why don't I get any type mismatch error with vbNo? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXIT SUB UPON VBCANCEL | Excel Discussion (Misc queries) | |||
how to convert date type to text type | Excel Discussion (Misc queries) | |||
how to change all the words of one type(Gunsuh type)to another | Excel Discussion (Misc queries) | |||
Adding new 'Type' to Format->Number->Time->Type | Excel Discussion (Misc queries) | |||
vbCancel | Excel Programming |