Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Return the number of Sheets in a Workbook


Is there a way in VB to return the number of sheets in a workbook

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Return the number of Sheets in a Workbook

Yes there is:

ActiveWorkbook.Sheets.Count

Regards,
Jos Vens

"gminor7" schreef in bericht
...

Is there a way in VB to return the number of sheets in a workbook?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Return the number of Sheets in a Workbook


Thanks

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Return the number of Sheets in a Workbook

activeworkbook.worksheets.Count

counts just the worksheets as opposed to all sheets, and

activeworkbook.charts.Count

counts the number of charts

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jos Vens" wrote in message
...
Yes there is:

ActiveWorkbook.Sheets.Count

Regards,
Jos Vens

"gminor7" schreef in bericht
...

Is there a way in VB to return the number of sheets in a workbook?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





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
Search multiple sheets and return largest number found mpenkala Excel Worksheet Functions 2 January 4th 07 04:41 PM
How can I count number of sheets present in a workbook? Imran Excel Discussion (Misc queries) 1 October 6th 06 11:06 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
Number of Sheets in a workbook formula PCLIVE Excel Worksheet Functions 2 June 22nd 06 09:56 PM
max number of sheets possible in a workbook? Boon8888 Excel Discussion (Misc queries) 2 February 2nd 06 06:20 PM


All times are GMT +1. The time now is 05:56 PM.

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

About Us

"It's about Microsoft Excel"