Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I am rather confused as to why the following macro does not work properly. The problem is when the user presses the cancel button without entering anything in the Inputbox it starts looping! However, if the user presses OK without entering anything in the Inputbox then it exits! Can you see why. Thanks for your help. Dim UInput as string Dim Msg as string Msg = "Enter todays date" Do UInput = Application.inputbox(Msg) If UInput = "" then Exit Sub If Isdate(UInput) then Msgbox "Thank You" Exit Do End if Msg = "You did not enter a date" Msg = Msg & vbNewLine Msg = Msg & "Enter todays date" Loop Regards UJ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Detecting Cancel in an InputBox Method | Excel Discussion (Misc queries) | |||
Cancel button in Inputbox method | Excel Programming | |||
Inputbox method using type:=8 - How to Cancel? | Excel Programming | |||
Inputbox method using type:=8 - How to Cancel? | Excel Programming | |||
Inputbox method using type:=8 - How to Cancel? | Excel Programming |