Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I must admit I thought there would be some way of catching
the click on the cancel button (vbCancel)... There is; use this subroutine structure as a guideline... Sub Test() Dim strInput As String strInput = InputBox("Some prompt for input") If Len(strInput) = 0 Then If StrPtr(strInput) = 0 Then MsgBox "User clicked Cancel Button" Else MsgBox "No text entry, user clicked Enter" End If Else MsgBox "The user inputted this text: " & strInput End If ' The subroutine code continues here End Sub Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA 2007 -- How can I tell if the user cancelled a Save? | Excel Programming | |||
Hyperlink operation cancelled.... | Excel Discussion (Misc queries) | |||
End Sub if InputBox cancelled (False) | Excel Programming | |||
Avoid unloading of .xla addins when closing books are cancelled. | Excel Programming | |||
Email Sent or Cancelled | Excel Programming |