Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From a previous post of mine
Const Msg1 As String = "Enter today's date" Const Msg2 As String = "You did not enter a valid date." & _ vbNewLine & "Please enter today's date" Dim UInput As Variant Dim bLoop As Boolean Do UInput = Application.InputBox( _ Prompt:=IIf(bLoop, Msg2, Msg1), _ Default:=Date) If UInput = False Then Exit Sub bLoop = True Loop Until IsDate(UInput) In article , rott wrote: Hi I currently have a macro that brings up an input box. The inputbox allows the user to enter in a date and if they click ok it proceeds with the rest of the macro. If the user hits cancel or the x in the corner of the inputbox it continues to loop until they enter a correct date in. What I am trying to do is have the macro end if they hit the cancel button. Can someone help me out? Thanks!! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Detecting Cancel in an InputBox Method | Excel Discussion (Misc queries) | |||
Inputbox or msgbox critical + Cancel | Excel Programming | |||
Inputbox and cancel button | Excel Programming | |||
Cancel button in Inputbox method | Excel Programming | |||
Inputbox method using type:=8 - How to Cancel? | Excel Programming |