Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Check for Print success

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Check for Print success

~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


DDonnachie wrote:

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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Check for Print success

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

"Duncan" wrote:

~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


DDonnachie wrote:

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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Check for Print success


Ok, sorry, I didnt know how to see if cancelled (but I do now!)

Regards

Duncan

DDonnachie wrote:

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

"Duncan" wrote:

~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


DDonnachie wrote:

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.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Check for Print success

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

HTH
Cordially
Pascal

"DDonnachie" a écrit dans le message
de news: ...
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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Check for Print success

Thanks Papou, i'll give it a try

"papou" wrote:

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

HTH
Cordially
Pascal

"DDonnachie" a écrit dans le message
de news: ...
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.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Check for Print success

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

"papou" wrote:

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

HTH
Cordially
Pascal

"DDonnachie" a écrit dans le message
de news: ...
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.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Check for Print success

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.

"papou" wrote:

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

HTH
Cordially
Pascal

"DDonnachie" a écrit dans le message
de news: ...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for success... corny I know Roger Excel Worksheet Functions 4 February 28th 09 02:53 AM
Not a lottery success with Excel Terry Excel Worksheet Functions 2 September 15th 06 01:46 PM
Determining football success.. Always Learning Excel Discussion (Misc queries) 0 June 16th 05 09:00 AM
No Success with GetSaveAs D.Parker Excel Discussion (Misc queries) 5 April 20th 05 02:16 PM
No success deleting modules BrianG[_4_] Excel Programming 1 October 18th 03 07:24 PM


All times are GMT +1. The time now is 11:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"