Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,089
Default Count number of prints.

Luis

not sure if I've understood you properly. The routine that follows is
slightly modified from the VB Help for VPageBreaks and HPageBreaks

Sub CountPageBreaks()
Dim cFull As Long
Dim cPartial As Long

cFull = 0
cPartial = 0
For Each pb In Worksheets(1).VPageBreaks
If pb.Extent = xlPageBreakFull Then
cFull = cFull + 1
Else
cPartial = cPartial + 1
End If
Next
MsgBox cFull & " full-screen page breaks, " & cPartial & _
" print-area page breaks"
Range("I1").Value = cFull

cFull = 0
cPartial = 0
For Each pb In Worksheets(1).HPageBreaks
If pb.Extent = xlPageBreakFull Then
cFull = cFull + 1
Else
cPartial = cPartial + 1
End If
Next
MsgBox cFull & " full-screen page breaks, " & cPartial & _
" print-area page breaks"
Range("I2").Value = cFull

End Sub

Regards

Trevor


"Luis Miguel" wrote in message
...
Hello,

I want to know if is possible to put, in a cell, a counter of number of
prints in a sheet or xls file.

Thanks in advance,
Luis Miguel.






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
Set number of prints in page setup Peggi Excel Discussion (Misc queries) 4 November 7th 08 05:57 PM
Is there a way to default the number times a document prints? Bat Excel Discussion (Misc queries) 1 August 24th 08 07:57 AM
count each cell that have a number and take that number and count. Vick Excel Discussion (Misc queries) 3 May 19th 06 01:51 AM
½ symbol prints a 2 and Winding square box prints a F frank-e Excel Discussion (Misc queries) 2 March 22nd 06 11:03 PM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM


All times are GMT +1. The time now is 04:27 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"