View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Number of Worksheets in a Workbook

Write a UDF


Function NumSheets()
NumSheets = Worksheets.Count
End Function

and use that


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dawn" wrote in message
...
Is there a way to write a function that will return the worksheet count to
the user on demand? I know worksheets.count will return the number in
VBA -
but how do I make it a function to show the number when needed by the
user?