ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I determine how many worksheets a workbook has at a glance (https://www.excelbanter.com/excel-worksheet-functions/133448-how-do-i-determine-how-many-worksheets-workbook-has-glance.html)

dm

How do I determine how many worksheets a workbook has at a glance
 
Received an inquiry by a supervisor who would like to know how many
worksheets a workbook has without actually paging through the workbook to
determine how many there are. Is there a way it can be shown at a glance how
many worksheets a workbook has?

[email protected]

How do I determine how many worksheets a workbook has at a glance
 
On Mar 5, 1:12 pm, dm wrote:
Received an inquiry by a supervisor who would like to know how many
worksheets a workbook has without actually paging through the workbook to
determine how many there are. Is there a way it can be shown at a glance how
many worksheets a workbook has?


If you click on FILE / PROPERTIES, it will list the worksheets on the
CONTENTS tab.


Mike

How do I determine how many worksheets a workbook has at a glance
 
Open CB editor ALT + F11 insert a new module and paste this in and maybe even
give your supervisor a nice button to press that runs this macro.

Sub makemybossleavemealone()
Dim sht As Worksheet
For Each sht In Sheets
X = X + 1
Next sht
MsgBox ("There are " & X & " Worksheets in this workbook")

End Sub

Mike

"dm" wrote:

Received an inquiry by a supervisor who would like to know how many
worksheets a workbook has without actually paging through the workbook to
determine how many there are. Is there a way it can be shown at a glance how
many worksheets a workbook has?


Gord Dibben

How do I determine how many worksheets a workbook has at a glance
 
dm

Sub sheets_num()
MsgBox ActiveWorkbook.Sheets.Count & " sheets in workbook"
End Sub


Gord Dibben MS Excel MVP

On Mon, 5 Mar 2007 11:12:51 -0800, dm wrote:

Received an inquiry by a supervisor who would like to know how many
worksheets a workbook has without actually paging through the workbook to
determine how many there are. Is there a way it can be shown at a glance how
many worksheets a workbook has?




All times are GMT +1. The time now is 09:37 PM.

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