Is there a simple, quick way to count how many worksheets are within a workbook?

It's not really that simple or quick...

Open Excel and create a new workbook. Open the VB Editor using <Alt> F11. Double-
click on ThisWorkbook to bring up a code window on the right. Paste in the
following lines:

		Option Explicit	Sub CountSheets()	Dim iSheetCount As Integer	iSheetCount = ActiveWorkbook.Worksheets.Count	MsgBox iSheetCount	End Sub	

Switch back to Excel and run the subroutine by using <Alt> F8 to bring up the
macro list and double-clicking on CountSheets. A dialog box will display the
number of worksheets.

(see Excel Tutorials)

Tags: excel

Last update:
2008-04-01 21:06
Ask MIStupid
Average rating: 1 (1 Vote)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.