Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak function problem
I am using Office 2003 on WindowsXP.
The following function should return true if a page break exists at a given row: Public Function PageBreakHorizontalExists(argRow As Long) As Boolean 'RETURNS TRUE IF A PAGE BREAK EXISTS ABOVE THE ROW SUPPLIED If Rows(argRow).PageBreak = xlNone Then PageBreakHorizontalExists = False Else PageBreakHorizontalExists = True End Function However, in a sheet where a user has inserted a manual break that covers "C223:H223" this function fails to return true. Can someone please correct this function so that it will identify manual page breaks such as the one described? Thanks much in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak function problem
Update to previous post:
This function works for "new" spreadsheets, but not older ones created in Office 2000 (or older). Any ideas? "quartz" wrote: I am using Office 2003 on WindowsXP. The following function should return true if a page break exists at a given row: Public Function PageBreakHorizontalExists(argRow As Long) As Boolean 'RETURNS TRUE IF A PAGE BREAK EXISTS ABOVE THE ROW SUPPLIED If Rows(argRow).PageBreak = xlNone Then PageBreakHorizontalExists = False Else PageBreakHorizontalExists = True End Function However, in a sheet where a user has inserted a manual break that covers "C223:H223" this function fails to return true. Can someone please correct this function so that it will identify manual page breaks such as the one described? Thanks much in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pagebreak function problem
Try adding data to any cell below the page break.
Then try your routine again. Jim Cone San Francisco, USA "quartz" wrote in message ... I am using Office 2003 on WindowsXP. The following function should return true if a page break exists at a given row: Public Function PageBreakHorizontalExists(argRow As Long) As Boolean 'RETURNS TRUE IF A PAGE BREAK EXISTS ABOVE THE ROW SUPPLIED If Rows(argRow).PageBreak = xlNone Then PageBreakHorizontalExists = False Else PageBreakHorizontalExists = True End Function However, in a sheet where a user has inserted a manual break that covers "C223:H223" this function fails to return true. Can someone please correct this function so that it will identify manual page breaks such as the one described? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cant move pagebreak in PageBreak View in Excel2003 | Excel Worksheet Functions | |||
Excel 2000 PageBreak problem | Excel Discussion (Misc queries) | |||
determine pagebreak using VBA | Excel Programming | |||
PageBreak Problems | Excel Programming | |||
How to pagebreak | Excel Programming |