Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tc tc is offline
external usenet poster
 
Posts: 40
Default Count number of sheets

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Count number of sheets

Try

Sub stantial()
numsheets = Worksheets.Count
end sub

Mike

"tc" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Count number of sheets

Use this UDF:

Function sheetcount() As Integer
sheetcount = Worksheets.Count
End Function

--
Gary''s Student - gsnu200743


"tc" wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Count number of sheets

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...

In article . com,
tc wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Count number of sheets

Note that this will give you the number of sheet in the ACTIVE workbook,
not in "a particular" workbook...

In article ,
Gary''s Student wrote:

Use this UDF:

Function sheetcount() As Integer
sheetcount = Worksheets.Count
End Function

--
Gary''s Student - gsnu200743


"tc" wrote:

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




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6,953
Default Count number of sheets

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

--
Regards,
Tom Ogilvy


"tc" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count number of sheets tc Excel Discussion (Misc queries) 3 September 10th 07 06:01 PM
Count number of sheets JHL Excel Discussion (Misc queries) 3 September 6th 07 09:06 PM
How can I count number of sheets present in a workbook? Imran Excel Discussion (Misc queries) 1 October 6th 06 11:06 AM
Count the number of sheets. Olle Svensson Excel Discussion (Misc queries) 3 March 13th 06 02:30 PM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"