ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   total no of excel sheet (https://www.excelbanter.com/excel-programming/279295-total-no-excel-sheet.html)

balakumar

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

Tom Ogilvy

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




Bill Barclift

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





All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com