PC Review


Reply
Thread Tools Rate Thread

Controlling Page Break Preview

 
 
Walter Briscoe
Guest
Posts: n/a
 
      6th Sep 2011
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!
--
Walter Briscoe
 
Reply With Quote
 
 
 
 
isabelle
Guest
Posts: n/a
 
      6th Sep 2011
hi Walter,

ActiveWindow.View = xlPageBreakPreview

ActiveWindow.View = xlNormalView

--
isabelle

 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      6th Sep 2011
also,

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

--
isabelle


Le 2011-09-06 10:45, isabelle a écrit :
> hi Walter,
>
> ActiveWindow.View = xlPageBreakPreview
>
> ActiveWindow.View = xlNormalView
>

 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      6th Sep 2011
on 9/6/2011, Walter Briscoe supposed :
> 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.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      6th Sep 2011
Typo...

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.


--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
Walter Briscoe
Guest
Posts: n/a
 
      7th Sep 2011
In message <j45brr$rc2$(E-Mail Removed)> of Tue, 6 Sep 2011 10:48:31
in microsoft.public.excel.programming, isabelle <(E-Mail Removed)> writes
>also,
>
>If ActiveWindow.View = xlPageBreakPreview Then ActiveWindow.View = xlNormalView
>


Precisely what I wanted! Thanks!
--
Walter Briscoe
 
Reply With Quote
 
Walter Briscoe
Guest
Posts: n/a
 
      7th Sep 2011
In message <j45fnl$ld2$(E-Mail Removed)> of Tue, 6 Sep 2011 11:54:23 in
microsoft.public.excel.programming, GS <(E-Mail Removed)> writes
>Typo...
>
> 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.

>


Thanks for your efforts, Garry. I wanted something in VBA code.
isabelle <(E-Mail Removed)> gave me what I wanted:
If ActiveWindow.View = xlPageBreakPreview Then ActiveWindow.View = xlNormalView
--
Walter Briscoe
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      7th Sep 2011
Walter Briscoe formulated the question :
> In message <j45fnl$ld2$(E-Mail Removed)> of Tue, 6 Sep 2011 11:54:23 in
> microsoft.public.excel.programming, GS <(E-Mail Removed)> writes
>> Typo...
>>
>> 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.

>>

>
> Thanks for your efforts, Garry. I wanted something in VBA code.
> isabelle <(E-Mail Removed)> 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>

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a page in Page Layout View or Page Break Preview tanner.robin@gmail.com Microsoft Excel Discussion 1 6th Jun 2008 02:52 PM
Table of Contents, controlling page break =?Utf-8?B?U2hlaWxhIEQ=?= Microsoft Word Document Management 3 20th Jun 2007 04:02 AM
change and/or remove page number watermark in page break preview =?Utf-8?B?anVnYQ==?= Microsoft Excel Misc 2 25th Dec 2006 10:15 AM
print preview v page break preview =?Utf-8?B?U2FtQg==?= Microsoft Excel Misc 0 16th Nov 2006 05:09 PM
Controlling the page break in a table row Dick Watson Microsoft Word New Users 7 13th Mar 2005 05:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 AM.