print no shading on selected sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following macro negates shading for printing.
But it only works for one sheet.
If I select more than one page, it only works on the last page.

How can I get this to work for all selected pages, either contigous or
non-contiguous?
*** A loop doesn't work, it throws the page numbering off, and has other
issues.
Thanx,
- Mike

ActiveSheet.PageSetup.BlackAndWhite = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.BlackAndWhite = False
 
for each sh in ActiveWindow.SelectedSheets
sh.PageSetup.BlackAndWhite = True
Next
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
for each sh in ActiveWindow.SelectedSheets
sh.PageSetup.BlackAndWhite = False
Next
 
Thanx Tom.
Since print jobs are sent sometimes to a paper printer and other times to
pdf, is there any chance of including "choose printer", as well as print
preview, in this code?
Again, much appreciated.
- Mike
 
Why not just pop the print dialog and let the user decide... something like
this...

for each sh in ActiveWindow.SelectedSheets
sh.PageSetup.BlackAndWhite = True
Next
Application.Dialogs(xlDialogPrint).Show
for each sh in ActiveWindow.SelectedSheets
sh.PageSetup.BlackAndWhite = False
Next
 
You probably want to use one of these:

application.Dialogs(xlDialogPrinterSetup).Show

or

application.Dialogs(xlDialogPrint).Show
 

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

Back
Top