Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

PrintPreview of multiple sheets under Excel 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lucky - 29 May 2008 04:16 GMT
Hi,

In Excel 2003 and older, I had a macro running that was selecting
multiple sheets and was presenting the result under printpreview mode
to the user. Exiting this mode (after a print or a close selection by
the user), that same macro was un-selecting the sheets and replacing
the user in the same situation then before executing the macro.

In Excel 2007, it works but no Excel buttons are visible to the user
so that he cannot print, he can only push "Escape" key to exit that
mode.

I tried that code :
       If Application.Version < 12 Then
           ActiveWindow.SelectedSheets.PrintPreview
       Else
           SendKeys "^{F2}"
       End If

It works, but if I have the simple code following (to replace the
file) :
       Sheets(Feuille2).Select

Then I preview only the sheet "Feuille2"

Does anybody have a solution ?

Thank you
Mike H. - 30 May 2008 12:51 GMT
Not sure this is your problem, but before you present a printpreview be sure
to do the following:

Application.ScreenUpdating = True
Application.Cursor = xlDefault
Application.EnableEvents = True

I always do and it seems to cut down on these problems.  Another issue I
have noticed.  If your excel macro is running to get ready for these
printpreviews, if you go to another window and check email or something like
that, when you finally come back to excel, you can NEVER click anything!  It
is most annoying!  This is in Excel 2007.  

> Hi,
>
[quoted text clipped - 24 lines]
>
> Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.