View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default print no shading on selected sheets

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

--
HTH...

Jim Thomlinson


"MikeF" wrote:

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

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"MikeF" wrote:

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