Howdi..
I'm trying to catch if a user press the cancel button in the ShowPrinter dialog but I can't figure it out...
Anyone that knows something about it???
Printable View
Howdi..
I'm trying to catch if a user press the cancel button in the ShowPrinter dialog but I can't figure it out...
Anyone that knows something about it???
Here is a simple way:
This example sets the commondialog control's CancelError property to true making the dialog give an error when a user clicks cancel. In theCode:On Error GoTo CancelCheck
CommonDialog1.CancelError = True
CommonDialog1.ShowPrinter
Exit Sub
CancelCheck:
MsgBox "They clicked cancel"
error handler, do what ever you wish. Call another sub or function, display a msgbox as I did, or whatever. Hope this helps.Code:CancelCheck
ho ho.. Thanks alot.