ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook Row Count Question (https://www.excelbanter.com/excel-programming/326177-workbook-row-count-question.html)

nca-wom

Workbook Row Count Question
 
I am not sure if this can be done or not. Any assistance that can be
provided would be most appreciated.

I have a XLS sheet with 24 tabs, various names. I want to get the count of
rows in each using VBA.

Please advise



ste

Workbook Row Count Question
 
Hi,

I'm not sure because at the moment I dont have the right version of
excel, but
I remember that in excel 2003 there is the listobject class.
Using vba you can rename each listobject and the get access to rowcount
property.

bye,
ste


Tom Ogilvy

Workbook Row Count Question
 
for each sh in ActiveWorkbook.Worksheets
msgbox sh.Name & ": " & sh.UserRange.Rows.count
Next

--
Regards,
Tom Ogilvy


"nca-wom" wrote in message
...
I am not sure if this can be done or not. Any assistance that can be
provided would be most appreciated.

I have a XLS sheet with 24 tabs, various names. I want to get the count

of
rows in each using VBA.

Please advise





Bob Phillips[_6_]

Workbook Row Count Question
 

For each sh In Activeworkbook.Worksheets
Debug.Print sh.Name, sh.UsedRange.Rows.Count
Next sh

--

HTH

RP
(remove nothere from the email address if mailing direct)


"nca-wom" wrote in message
...
I am not sure if this can be done or not. Any assistance that can be
provided would be most appreciated.

I have a XLS sheet with 24 tabs, various names. I want to get the count

of
rows in each using VBA.

Please advise





Tom Ogilvy

Workbook Row Count Question
 
Had a typo in the 2nd line:
msgbox sh.Name & ": " & sh.UserRange.Rows.count
should be
msgbox sh.Name & ": " & sh.UsedRange.Rows.count

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
for each sh in ActiveWorkbook.Worksheets
msgbox sh.Name & ": " & sh.UserRange.Rows.count
Next

--
Regards,
Tom Ogilvy


"nca-wom" wrote in message
...
I am not sure if this can be done or not. Any assistance that can be
provided would be most appreciated.

I have a XLS sheet with 24 tabs, various names. I want to get the count

of
rows in each using VBA.

Please advise








All times are GMT +1. The time now is 09:08 PM.

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