Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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
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
Cant move pagebreak in PageBreak View in Excel2003 Vasanthan Excel Worksheet Functions 1 August 22nd 07 03:28 PM
Excel 2000 PageBreak problem PhilC Excel Discussion (Misc queries) 1 April 28th 06 12:27 PM
determine pagebreak using VBA mirec Excel Programming 2 April 15th 05 01:36 PM
PageBreak Problems Don Lloyd Excel Programming 1 December 11th 04 02:21 PM
How to pagebreak Bilal A F Excel Programming 1 November 13th 03 06:57 PM


All times are GMT +1. The time now is 02:57 PM.

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

About Us

"It's about Microsoft Excel"