To work around this issue, use either of the following
methods.
Method 1: Manually disable the page breaks display
To do this in Excel 2003 and in earlier versions of Excel, follow these
steps:
- Click Options on
the Tools menu.
- Click the View tab. Under Window options, click to clear the
Page breaks check box. Click OK.
To do this in Excel 2007, follow these steps:
- Click the Microsoft Office Button, and then
click Excel Options.
- Click the Advanced category, and then
click to clear the Show page breaks check box under the
Display options for this worksheet section.
Method 2: Disable the page breaks display programmatically
Microsoft
provides programming examples for illustration only, without warranty either
expressed or implied. This includes, but is not limited to, the implied
warranties of merchantability or fitness for a particular purpose. This article
assumes that you are familiar with the programming language that is being
demonstrated and with the tools that are used to create and to debug
procedures. Microsoft support engineers can help explain the functionality of a
particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific requirements.
To disable the page breaks display programmatically, add the following line of
code to your VBA macro.
ActiveSheet.DisplayPageBreaks = False
Important You must insert this line of code after you modify any of the
properties of the
PageSetup object, but before you modify the properties or the rows on your
worksheet.