Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Count number of manual and automatic vertical page breaks - examples

no question here, just a couple of procedures for the archive.


search criteria: count the number of manual and automatic page breaks
in
worksheet. Get the total number of VPageBreaks in worksheet.
VPageBreaks.Count

Sub PageBreaksVCountM()
'Counts the number of manual vertical page breaks on the
'active worksheet.

Dim VPB As VPageBreak
Dim N As Long
For Each VPB In ActiveSheet.VPageBreaks
If VPB.Type = xlPageBreakManual Then
N = N + 1
End If
Next VPB
MsgBox "There are " & N & " manual vertical page breaks on this
worksheet"
End Sub



Sub PageBreaksVCountMA()
'Counts the number of vertical manual & auto page breaks on the
'active worksheet.
Dim VBreaksCount As Integer
VBreaksCount = ActiveSheet.VPageBreaks.Count
MsgBox "There are " & VBreaksCount & " manual and automatic
vertical page breaks on this sheet"
End Sub
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
Vertical page breaks - one per column Staceyglow Excel Worksheet Functions 1 January 8th 10 11:35 PM
Vertical page breaks won't drag in Page Break Preview Caroline Excel Discussion (Misc queries) 0 July 14th 09 12:19 PM
Dealing with automatic / manual page breaks Turquoise_dax Excel Discussion (Misc queries) 2 June 27th 06 02:50 PM
Count the number of just the horizontal manual page breaks DataFreakFromUtah Excel Programming 1 November 27th 03 03:59 PM
Moving Vertical Page Breaks in Excel via VB steveokur Excel Programming 5 October 30th 03 09:11 PM


All times are GMT +1. The time now is 08:46 AM.

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"