Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default total no of excel sheet

i am using visual basic 6.0. i need to know total no of
excel sheet avaiable in one excel file thru vb
program.how to do that?

Thanks
balakumar
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default total no of excel sheet

xlApp.ActiveWorkbook.Sheets.count

or for worksheets

xlApp.ActiveWorkbook.Worksheets.count

--
Regards,
Tom Ogilvy

balakumar wrote in message
...
i am using visual basic 6.0. i need to know total no of
excel sheet avaiable in one excel file thru vb
program.how to do that?

Thanks
balakumar



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default total no of excel sheet

Sheets can include both Charts and Worksheets.

For both charts and Worksheets (includeing Excel4 macro sheets)

xlApp.ActiveWorkbook.Sheets.count

For Charts only:

xlApp.ActiveWorkbook.charts.count

For Worksheets only:

xlApp.ActiveWorkbook.Worksheets.count


Bill Barclift


"balakumar" wrote in message
...
i am using visual basic 6.0. i need to know total no of
excel sheet avaiable in one excel file thru vb
program.how to do that?

Thanks
balakumar



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
total columns of one sheet on another sheet Tash Excel Worksheet Functions 1 January 21st 09 04:01 PM
how to get grand total in words in excel sheet gangadhar Excel Worksheet Functions 2 December 12th 08 12:20 AM
moving informatiion from one sheet to a total sheet john Excel Discussion (Misc queries) 2 January 31st 08 10:17 PM
Cell Total shown Sheet to Sheet macgilgamesh New Users to Excel 3 October 8th 05 03:06 PM
in excel, how do i set up a spread sheet that automatically total. jgus New Users to Excel 1 January 14th 05 04:10 AM


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"