ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to get a number of rows in a given page? (https://www.excelbanter.com/excel-programming/299103-how-get-number-rows-given-page.html)

Gorr

how to get a number of rows in a given page?
 
automating excel 97
excel file is saved in page brake preview.
I'm opening the file programmaticaly and need to figure how many pages, and
how many rows on each page defined.

--
Thanks



Chris

how to get a number of rows in a given page?
 
For Each s in Sheet
x = x +
LstRow = s.UsedRange.Offset
(s.UsedRange.Rows.Count - 1).
Resize(1).Ro
Debug.Print s.name & " Has " & LstRow & " Used Rows
Nex
Debug.print "Total number of sheets = " x
----- Gorr wrote: ----

automating excel 9
excel file is saved in page brake preview
I'm opening the file programmaticaly and need to figure how many pages, an
how many rows on each page defined

-
Thank




Gorr

how to get a number of rows in a given page?
 
brilliant!

--
Thanks
"chris" wrote in message
...
For Each s in Sheets
x = x +1
LstRow = s.UsedRange.Offset _
(s.UsedRange.Rows.Count - 1). _
Resize(1).Row
Debug.Print s.name & " Has " & LstRow & " Used Rows"
Next
Debug.print "Total number of sheets = " x
----- Gorr wrote: -----

automating excel 97
excel file is saved in page brake preview.
I'm opening the file programmaticaly and need to figure how many

pages, and
how many rows on each page defined.

--
Thanks







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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com