Controlling Page Break Preview

W

Walter Briscoe

I run Excel 2003 with VBA 6.5

I have been given a file which looks strange.
The pages of the active sheet have Page 1, Page 2, ... Page n on them
when viewed in Excel.
I Googled and worked out that this is because I am looking at the Page
Break Preview of the active sheet. My first wrong thought was that I was
looking at a watermark (A semi-transparent shape).

I can get out of this by clicking Normal View in File/Print Preview.

I tried recording a macro to do this but only recorded
ActiveWindow.SelectedSheets.PrintPreview

I want code to identify that I am looking at a Page Break Preview and to
set Normal View.

I am afraid that Google groups Advanced Search (<http://groups.google.co
m/advanced_search?num=100&q=&>) just shows me a title rather than a form
at the moment; This limits my helping myself. I have recently seen other
reports of the same Google problem.

Thanks!
 
I

isabelle

hi Walter,

ActiveWindow.View = xlPageBreakPreview

ActiveWindow.View = xlNormalView
 
I

isabelle

also,

If ActiveWindow.View = xlPageBreakPreview Then ActiveWindow.View = xlNormalView
 
G

GS

I run Excel 2003 with VBA 6.5

I have been given a file which looks strange.
The pages of the active sheet have Page 1, Page 2, ... Page n on them
when viewed in Excel.
I Googled and worked out that this is because I am looking at the Page
Break Preview of the active sheet. My first wrong thought was that I was
looking at a watermark (A semi-transparent shape).

I can get out of this by clicking Normal View in File/Print Preview.

I tried recording a macro to do this but only recorded
ActiveWindow.SelectedSheets.PrintPreview

I want code to identify that I am looking at a Page Break Preview and to
set Normal View.

I am afraid that Google groups Advanced Search (<http://groups.google.co
m/advanced_search?num=100&q=&>) just shows me a title rather than a form
at the moment; This limits my helping myself. I have recently seen other
reports of the same Google problem.

Thanks!

Why not just add NormalView/PageBreakPreview buttons next to the
PrintPreview button on the toolbar? If you use XL2007 or later its
already on the View ribbon, Workbook Views section.
 
W

Walter Briscoe

In message said:
Typo...

Why not just add NormalView/PageBreakPreview buttons next to the

Thanks for your efforts, Garry. I wanted something in VBA code.
isabelle <[email protected]> gave me what I wanted:
If ActiveWindow.View = xlPageBreakPreview Then ActiveWindow.View = xlNormalView
 
G

GS

Walter Briscoe formulated the question :
Thanks for your efforts, Garry. I wanted something in VBA code.
isabelle <[email protected]> gave me what I wanted:
If ActiveWindow.View = xlPageBreakPreview Then ActiveWindow.View =
xlNormalView

Yes, I realize Isabelle met your request. I just find it most
convenient to have the button on the Formatting toolbar because I use
it quite a lot. It's easier to click it there than open the macros
dialog or use a submenu added to an existing menu.<g>
 

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