Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Printing / January 2007

Tip: Looking for answers? Try searching our database.

Showing the print dialog without printing when pressing ok?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Magnus Flysjö - 08 Jan 2007 23:58 GMT
I want to show the print dialog "xlDialogPrinter" and then control what to
print by myself afterwards. In other words, I dont want Excel to start a
printing the current selected worksheet when the user press "OK".
Instead I want to fetch the OK button press by checking the .Show method
result for "-1" and then do my own ".PrintOut" calls on the Worksheets I
want to be printed.

Can this be done in some way?
Magnus Flysjö - 09 Jan 2007 00:17 GMT
Hmm, after googling around some more I guess the correct way to do this is
to select all the worksheets I want to print and then call the
xlDialogPrint.
Like:

ReDim MySheetArray(1 To 2)
MySheetArray(1) = ThisWorkbook.Worksheets("First sheet")
MySheetArray(2) = ThisWorkbook.Worksheets("Second sheet")
Worksheets(MySheetArray).Select
Application.Dialogs(xlDialogPrint).Show

>I want to show the print dialog "xlDialogPrinter" and then control what to
>print by myself afterwards. In other words, I dont want Excel to start a
[quoted text clipped - 4 lines]
>
> Can this be done in some way?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.