Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2007

Tip: Looking for answers? Try searching our database.

Count number of sheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tc - 10 Sep 2007 17:02 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.