|
-
April 25th, 2001, 10:09 AM
#1
Detecting clicking the Cancel Button using common dialog controls
Hi,
I want to exit a sub if a user hits the cancel button in a save/open dialog. How do I do it????
-
April 25th, 2001, 11:25 AM
#2
Re: Detecting clicking the Cancel Button using common dialog controls
you use CommonDialiog.ShowOpen function to display your dialog?
if yes, just after the call to ShowOpen test if
CommonDialog.FileName = ""
if yes it's because cancel have been pressed or because the user has exited the dialog without selecting a file.
-
April 25th, 2001, 12:16 PM
#3
Re: Detecting clicking the Cancel Button using common dialog controls
Set the cancelerror to true, and then add code for exiting the sub on your on error goto...
-
April 25th, 2001, 02:06 PM
#4
Re: Detecting clicking the Cancel Button using common dialog controls
CommonDialog1.CancelError = true
CommonDialog1.ShowOpen
If Err.Number <> 0 then Exit Sub
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|