Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print a selected number of sheets | Excel Discussion (Misc queries) | |||
How to print a selected number of sheets? | Excel Worksheet Functions | |||
Print selected sheets in Excel | Excel Programming | |||
Print selected sheets in Excel | Excel Programming | |||
Print selected sheets in Excel | Excel Programming |