Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
I have a macro that ends with a print preview of the worksheet. I can not
seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
sheets(1).printpreview
activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
Thanks Trevor,
But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
I'm not sure I understand. If you Print Preview, I guess Excel assumes you
want to look at the preview. Hence you (or the user) determine when you've seen enough. As far as I know, this will have to be a manual intervention. Regards "Pb" wrote in message ... Thanks Trevor, But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
Trevor,
You understand correctly. It is a problem that I have for an Excel class and the final step is to have the macro close the print preview. Being new to this I thought I might not be understanding a step or something in creating the macro. Thanks for your patience and explaining. Peter "Trevor Shuttleworth" wrote: I'm not sure I understand. If you Print Preview, I guess Excel assumes you want to look at the preview. Hence you (or the user) determine when you've seen enough. As far as I know, this will have to be a manual intervention. Regards "Pb" wrote in message ... Thanks Trevor, But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
When VBA issues the printpreview command, the code waits until the user
closes it manually. The only thing I could think of would be to do a sendkeys just before doing printpreview (it that even works), but that would immediately drop the window (if it works). Not much utility there. Sure the assignment wants you to close the printpreview window (maybe a userform or something that you called it from). -- Regards, Tom Ogilvy "Pb" wrote in message ... Trevor, You understand correctly. It is a problem that I have for an Excel class and the final step is to have the macro close the print preview. Being new to this I thought I might not be understanding a step or something in creating the macro. Thanks for your patience and explaining. Peter "Trevor Shuttleworth" wrote: I'm not sure I understand. If you Print Preview, I guess Excel assumes you want to look at the preview. Hence you (or the user) determine when you've seen enough. As far as I know, this will have to be a manual intervention. Regards "Pb" wrote in message ... Thanks Trevor, But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
If you don't want it to do print preview, change the line that says Preview
= True to Preview = False "Pb" wrote in message ... Thanks Trevor, But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Preview Macro
Tom & Jim,
Thanks for the suggestions. Like I mentioned to Trevor, I am just starting out on this VBA thing and don't know if my continued head beating is worth the 1 or 2 pts. to get it to run as requested in the assignment. Thanks again, Peter "Jim" wrote: If you don't want it to do print preview, change the line that says Preview = True to Preview = False "Pb" wrote in message ... Thanks Trevor, But it still will not "close" after the preview. "Trevor Shuttleworth" wrote: sheets(1).printpreview activesheet.printpreview Regards Trevor "Pb" wrote in message ... I have a macro that ends with a print preview of the worksheet. I can not seem to get the macro to record the close on the print preview. Any suggestions - be careful, I am very new at this vb stuff. Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro & Print Preview? | Excel Discussion (Misc queries) | |||
Print Preview Macro | Excel Discussion (Misc queries) | |||
How do I turn off print preview with a macro? | Excel Programming | |||
Why does macro speed slow after Excel Print or Print Preview? | Excel Programming | |||
Macro buttons tiled after print / print preview | Excel Programming |