Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your reply.
I see what you're saying. I tried .PrintOut with the command button approach, but not with the BeforePrint approach. But, won't I still NOT get the print options dialog when I use .PrintOut with BeforePrint? I guess my question was poorly stated, in that I want BOTH -- the shading/unshading, AND the print options dialog. Do you know any way I can get both? Thanks, Phil "Jim Thomlinson" wrote: The whole thing is done with the before print. the general flow is to cancel the print job, do your shading, disable the events print the document and re-enable the events... Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True Application.EnableEvents = False 'do your shading ThisWorkbook.PrintOut 'undo your shading Application.EnableEvents = True End Sub -- HTH... Jim Thomlinson "pwrichcreek" wrote: I want to get control before printing, change the shading on certain cells so that the shading does not show up on the printed page, and then get control again after printing and change the shading back to what it was before printing. The WorkbookBeforePrint event works fine and I get the desired printing. But I don't know how to get control to change the shading back. Is there some other event I can intercept that will let me make the formatting change after printing? If I use the .PrintOut method on a commnd button, I get control both before and after printing. However, I lose the printer setup dialog (destination printer, number of copies, etc.) that comes "for free" with the File/Print command. Is there something I can do to get the printer setup dialog to come up when using .PrintOut? TIA, Phil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
Control ToolBox OptionButtons Printing? | Excel Discussion (Misc queries) | |||
Printing the contents of a text control on a user form | Excel Programming | |||
My spreadsheet has a control box. box moves after printing. Why? | Excel Discussion (Misc queries) | |||
Error "Permission denied" when printing Web Browser control from button on userform, | Excel Programming |