Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Attach it to a button then button will the do the following
p=Worksheets.Count Msgbox(p) -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Dawn" wrote: 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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
call with =numbersheets()
Function numbersheets() numbersheets = Worksheets.Count End Function I would recommend the info function but instead of returning 3 worksheets, it is returning 6. I not going to tell you to use something that gives a wrong answer. =INFO("numfile") "Dawn" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a maximum of the number of worksheets in a workbook? | Excel Discussion (Misc queries) | |||
number worksheets in workbook | Excel Discussion (Misc queries) | |||
Counting the number of Worksheets in a Workbook | Excel Worksheet Functions | |||
Max number of worksheets in a workbook? | Excel Programming | |||
Add Workbook with specific number of worksheets | Excel Programming |