Hi. I want to create a macro that will count the number of sheets in a
particular workbook. Is this possible?
Mike H - 10 Sep 2007 17:08 GMT
Try
Sub stantial()
numsheets = Worksheets.Count
end sub
Mike
> Hi. I want to create a macro that will count the number of sheets in a
> particular workbook. Is this possible?
Gary''s Student - 10 Sep 2007 17:08 GMT
Use this UDF:
Function sheetcount() As Integer
sheetcount = Worksheets.Count
End Function

Signature
Gary''s Student - gsnu200743
> Hi. I want to create a macro that will count the number of sheets in a
> particular workbook. Is this possible?
JE McGimpsey - 10 Sep 2007 17:17 GMT
Note that this will give you the number of sheet in the ACTIVE workbook,
not in "a particular" workbook...
> Use this UDF:
>
[quoted text clipped - 4 lines]
> > Hi. I want to create a macro that will count the number of sheets in a
> > particular workbook. Is this possible?
JE McGimpsey - 10 Sep 2007 17:16 GMT
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...
> Hi. I want to create a macro that will count the number of sheets in a
> particular workbook. Is this possible?
Tom Ogilvy - 10 Sep 2007 17:22 GMT
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

Signature
Regards,
Tom Ogilvy
> Hi. I want to create a macro that will count the number of sheets in a
> particular workbook. Is this possible?