Check for Print success

G

Guest

Hi

ok using the following code to bring up print dialogue

Application.Dialogs(xlDialogPrint).Show arg12:=2

but I have code which I only want to run if the print has been successful.
Obviously they can cancel out of this dialogue without printing, which I
want to know.
 
D

Duncan

~just a question:

is there a reason to use the dialog instead of just printing for them?

thisworkbook.printout

are they all printing to the same printer, or is it their default, is
it a network printer etc?

(I dont know personally how to see if they pressed ok to print, so
easier would be to see if we could remove the dialog)

Duncan
 
P

papou

Hello
If Application.Dialogs(xlDialogPrint).Show(arg12:=2) = False _
Then MsgBox "Print was cancelled", vbInformation, "Cancelled"

HTH
Cordially
Pascal
 
G

Guest

They need to be able to choose their printer, as there have been frequent
problems with network printers and queues here.
 
G

Guest

Thanks Papou, i'll give it a try

papou said:
Hello
If Application.Dialogs(xlDialogPrint).Show(arg12:=2) = False _
Then MsgBox "Print was cancelled", vbInformation, "Cancelled"

HTH
Cordially
Pascal
 
G

Guest

Thank Papou that worked, exactly what I was looking for. Now to go and add it
into the other dozen Excel workbooks, lol
 
G

Guest

Papou I would mark your post as the answer but I can't see the rate button on
my works explorer, do it when i get home.
 

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