![]() |
print no shading on selected sheets
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 |
print no shading on selected sheets
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 |
print no shading on selected sheets
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 |
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 |
print no shading on selected sheets
You probably want to use one of these: application.Dialogs(xlDialogPrinterSetup).Show or application.Dialogs(xlDialogPrint).Show -- Regards, Tom Ogilvy "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 |
All times are GMT +1. The time now is 04:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com