This is VBA, so you need to go to the
VB IDE (Alt-F11) and then either
- add it to a macro that you are writing
OR
- create a UDF that returns it if you want it in a worksheet function
Function NumSheets()
NumSheets = Application.Caller.Parent.Parent.Worksheets.Count
End Function
and add
=NumSheets()
in your worksheet
--
HTH
Bob Phillips
"Ankur" wrote in message
...
i am not able to do that can u please explain in detail......thanks for
your
help
"Bob Phillips" wrote:
ACtiveworkbook.Worksheets.Count
--
HTH
Bob Phillips
"Ankur" wrote in message
...
is there any command to count the total no of worksheets in a file