Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pb pb is offline
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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   Report Post  
Posted to microsoft.public.excel.programming
pb pb is offline
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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   Report Post  
Posted to microsoft.public.excel.programming
pb pb is offline
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
pb pb is offline
external usenet poster
 
Posts: 19
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro & Print Preview? Ken Excel Discussion (Misc queries) 2 April 2nd 08 12:52 PM
Print Preview Macro Emanuel Violante Excel Discussion (Misc queries) 1 June 2nd 06 11:28 AM
How do I turn off print preview with a macro? Zorro[_2_] Excel Programming 3 March 12th 06 04:25 PM
Why does macro speed slow after Excel Print or Print Preview? Larry A[_3_] Excel Programming 6 May 16th 05 11:22 AM
Macro buttons tiled after print / print preview Eddie Chan Excel Programming 2 January 1st 05 02:50 PM


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"