Cancel the printer setup dialog

P

Peter

Does anyone know of a way of detecting the Cancel button from the Printer
Setup dialogue box, as in ... Application.Dialogs(xlDialogPrinterSetup).Show
 
V

Vergel Adriano

Peter,

if it returns false, the user clicked on Cancel.

If False = Application.Dialogs(xlDialogPrinterSetup).Show Then
MsgBox "User Cancelled"
End If
 
D

Dave Peterson

One way:

Dim res As Boolean
res = Application.Dialogs(xlDialogPrinterSetup).Show
MsgBox res
 
P

Peter

It does help - Thankyou.
--
Regards - Peter


Vergel Adriano said:
Peter,

if it returns false, the user clicked on Cancel.

If False = Application.Dialogs(xlDialogPrinterSetup).Show Then
MsgBox "User Cancelled"
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top