|
-
March 22nd, 2001, 04:06 AM
#1
CommonDialog
Hi
Anyone can tell me how i can know when a cancel button has been clicked when i open a CommonDialog ?
Thanks
-
March 22nd, 2001, 04:16 AM
#2
Re: CommonDialog
There is a property of commondialog:
cancelerror
when it is set to true you get error when user press cancel.
use onerror goto to trap this situation
Valery Iskarov Nikolov
http://listen.to/quark
-
March 22nd, 2001, 08:12 AM
#3
Re: CommonDialog
Just to add to vin comment
Use the CancelError property to trigger a trappable error if cancel is selected, i.e.
private Sub Command1_Click()
on error GoTo Cancelled
With CommonDialog1
.CancelError = true
.ShowSave
'Save Code Here
End With
MsgBox "File Saved.", vbInformation + vbOKOnly, "Saved."
Cancelled:
End Sub
Iouri Boutchkine
[email protected]
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
|