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?