Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default Pagebreaks are not made

Is this question about displaying the default pagebreaks in excel?
You can try following:

Application.ActiveWindow.View = xlPageBreakPreview
Application.ActiveWindow.View = xlNormalView

Once gone it to PageBreak view and come back to normal view
it continues to show the page breaks.
In your case, of course, since you are doing it thorough VB
you can refer to your excel application object istead of
Application.

Sharad



"microstoc" wrote in message
lkaboutsoftware.com...
I am automating Excel from VB6.
I ran into a similar problem using your method.
I have just stumbled upon this method that seems to work.

'select a cell, make it active
Range("A14").Select

'insert pagebreak in the active cell
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCells

Does it work for 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
can I apply the same formating and pagebreaks to another workbook aprilgwynne Setting up and Configuration of Excel 0 March 11th 08 03:29 PM
Is there no one who uses PageBreaks? HPageBreaks? GeorGeorGe Excel Worksheet Functions 0 February 11th 05 05:53 PM
pagebreaks Yiannis H. Economides Excel Programming 1 February 19th 04 04:03 PM
VBA Code Printouts with PageBreaks MWE[_2_] Excel Programming 0 December 31st 03 10:58 PM
Excel pagebreaks Don Nicholson Excel Programming 0 September 15th 03 05:44 PM


All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"