Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vertical page breaks - one per column | Excel Worksheet Functions | |||
Vertical page breaks won't drag in Page Break Preview | Excel Discussion (Misc queries) | |||
Dealing with automatic / manual page breaks | Excel Discussion (Misc queries) | |||
Count the number of just the horizontal manual page breaks | Excel Programming | |||
Moving Vertical Page Breaks in Excel via VB | Excel Programming |