Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Printer Setup Dialog Box

This works for me...but..Once I do this...

Application.Dialogs(xlDialogPrinterSetup).Show

if the user cancels the dialog box my macro fails. How can I direct the
cancel button back to a point in my macro.





*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Printer Setup Dialog Box

Try what's below. This controls what happens when you press the cancel button.

res = Application.Dialogs(xlDialogPrint).Show
If res = False Then
' dialog cancelled
....[your code]
End If


"Michael Smith" wrote:

This works for me...but..Once I do this...

Application.Dialogs(xlDialogPrinterSetup).Show

if the user cancels the dialog box my macro fails. How can I direct the
cancel button back to a point in my macro.





*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Printer Setup Dialog Box

Try this

pr = Application.Dialogs(xlDialogPrinterSetup).Show
If pr = False Then
' User cancelled
Exit Sub
End If


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Michael Smith" wrote in message ...
This works for me...but..Once I do this...

Application.Dialogs(xlDialogPrinterSetup).Show

if the user cancels the dialog box my macro fails. How can I direct the
cancel button back to a point in my macro.





*** Sent via Developersdex http://www.developersdex.com ***



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
Printing/printer setup re Excel David Brereton[_2_] Excel Discussion (Misc queries) 0 August 4th 08 01:49 PM
Printer Setup For Multiple sheets Ed Davis Excel Worksheet Functions 1 April 22nd 07 08:03 PM
XLDialog Printer Setup Ron Crapo Excel Programming 2 August 27th 04 05:40 PM
Printer Dialog Box Trevor Williams Excel Programming 2 July 12th 04 02:21 PM
Printer Dialog Box Todd Huttenstine Excel Programming 5 May 5th 04 10:16 PM


All times are GMT +1. The time now is 11:13 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"