Count number of sheets

  • Thread starter Thread starter tc
  • Start date Start date
T

tc

Hi. I want to create a macro that will count the number of sheets in a
particular workbook. Is this possible?
 
Use this UDF:

Function sheetcount() As Integer
sheetcount = Worksheets.Count
End Function
 
Please don't post the same message in multiple newsgroups. It only tends
to fragment your answers, and potentially waste the time of those
answering questions that have already been answered...
 
Note that this will give you the number of sheet in the ACTIVE workbook,
not in "a particular" workbook...
 
Worksheets would be a subset of the sheets in a workbook.

if there could be chart sheets or macro sheets (less likely) as well

activeworkbook.Sheets.count
 

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

Back
Top