Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default PrintPreview of multiple sheets under Excel 2007

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default PrintPreview of multiple sheets under Excel 2007

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.


"Lucky" wrote:

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

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
sumif across multiple sheets in excel 2007 based on a condition dave@homedeliverygroup Excel Worksheet Functions 6 May 13th 10 07:42 PM
Making a table for multiple sheets Excel 2007 REVILO Excel Discussion (Misc queries) 2 June 22nd 08 04:34 PM
PrintPreview problem in 2007 Corey ....[_2_] Excel Programming 1 May 21st 08 03:18 AM
2007 Print Preview Issue when printing multiple sheets [email protected] Excel Programming 0 March 19th 08 12:38 PM
PrintPreview in 2007 (for what it's worth...) rpw Excel Programming 0 April 24th 07 05:38 PM


All times are GMT +1. The time now is 07:46 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"