PrintPreview problem

G

Guest

Hi,

I have a macro that uses the following code snippet that worked fine in 2003
and XP.

Set Wsh = Worksheets("Summary Sheet")
Wsh.Activate 'Needs to be activate for PrintPreview
Application.ScreenUpdating = False
ActiveWorkbook.Unprotect
Wsh.Visible = xlSheetVisible
Wsh.Activate
Wsh.PrintPreview

Now with 2007, the preview is right but the problem is that there is no way
to print from this mode. I can exit the preview with the "Esc" key or
"Ctrl-c" but "Ctrl-P" does not do anything and the "Office Button" (and the
Print Menus) and all Ribbon access is unavailable.

How can I modify the code so that the user can print the preview? Or will I
have to duplicate the entire macro, create a new control button, and edit the
macro to Print (rather than printpreview)?
 
G

Guest

Thanks for the response Mike. Unfortunately I get the same results whether
the method is "ActiveWindow.SelectedSheets.PrintPreview" or
"Wsh.PrintPreview".

It appears that for some unknown reason using the PrintPreview method
disables Excel 2007's ability to print from the preview.

Perhaps someone at Microsoft is reading this and has an answer? Or an Excel
MVP knows of a simple workaround?
 
G

Guest

Aha! I have located the problem: Application.ScreenUpdating = False

If this is set to 'True' in 2007 then there is no problem with the preview
(but the display transition is not as smooth as in XP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top