LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to activate InputBox Cancel Function

I use InputBox to display a simple dialog box so that User can enter
information to be used in a macro. The dialog box has an OK button and a
Cancel button. How do I activate the Cancel button to perform the function
that I want?

I tried below code but it will do nothing and exit the program even when
User click the OK button.

a = InputBox ("Enter Password to Proceed:")

If vbCancel = True Then
Do nothing
End If

If a < "12345" Then
MsgBox "INVALID PASSWORD !!!" & vbNewLine & "You have no administrator
rights to access the function.", vbCritical

End
End If
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
InputBox: Separate CANCEL and 0 Mike Excel Programming 3 July 20th 07 03:14 PM
How do I capture CANCEL on an Inputbox? Toxicdistortion Excel Programming 3 October 27th 06 01:23 AM
InputBox - cancel button Greg Billinge Excel Programming 4 October 11th 04 06:45 PM
InputBox Function & Cancel Otto Moehrbach[_6_] Excel Programming 4 September 30th 04 01:13 AM
Clicking Cancel on an Inputbox rott[_6_] Excel Programming 3 March 5th 04 02:57 AM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"