cancel a procedure if the user clicked the Cancel button in a dialog box: : Dialogs « Application « VBA / Excel / Access / Word

Home
VBA / Excel / Access / Word
1.Access
2.Application
3.Data Type
4.Data Type Functions
5.Date Functions
6.Excel
7.File Path
8.Forms
9.Language Basics
10.Math Functions
11.Outlook
12.PowerPoint
13.String Functions
14.Windows API
15.Word
16.XML
VBA / Excel / Access / Word » Application » Dialogs 




cancel a procedure if the user clicked the Cancel button in a dialog box:
 
Sub dlg()
    If Dialogs(wdDialogFileOpen).show = Then End
End Sub

 
Related examples in the same category
1.Set the contents of the File Name text box in the Save As dialog box in Word and then display the dialog box
2.Returning the Button the User Chose in a Dialog Box
3.Specifying a Timeout for a Dialog Box
4.Display one of Excel's built-in dialog boxes and let the user make the choices: by using the Application object's Dialogs property.
5.To display Excel's Open dialog box
6.Using an Application's Built-in Dialog Boxes from VBA: wdDialogFileOpen
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.