Counting No of Worksheets

R

Rajujay

Hi,
Could anyone tell me whether its possible to count the No of worksheet
in an Excel file with out opening it.

if not, how to count the worksheets and charts when the excel file i
opene
 
B

Bernie Deitrick

Rajujay,

You can't count the sheets of a closed workbook, AFAIK.

When it is open, the number of worksheets and charts are:

Activeworkbook.Worksheets.Count
Activeworkbook.Charts.Count

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top