?
Solved

VBA / Excel 97  PageBreak Control

Posted on 1998-05-27
2
Medium Priority
?
359 Views
Last Modified: 2006-11-17
I need to take an existing XLS file and reformat it.
After changing the font size, the page breaks are
not positioned correctly. I plan to take out
all PageBreaks and then insert them based the contents
of cells in the first column. In other words
, the procedure I need is to end the page
when the "paragraph" is done and some pages
will have more white space at the bottom than
others.
 I attempt and fail to remove the PBs with:

For Each pb In Worksheets(2).HPageBreaks  
    pb.Delete
Next
 Then I have to "rewind" and start putting PBs
back in passed on logic described above.

How do I remove all PBs.
  Many thanks, Mark
0
Comment
Question by:mbarron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 200 total points
ID: 1461759
mbarron,

To remove all pagebreaks use the following:

Worksheets("Sheet1").Cells.PageBreak = xlPageBreakNone


Best regards
Bin Huwairib
0
 

Author Comment

by:mbarron
ID: 1461760
Many thanks, I am very grateful for your time.
 Mark
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question