count tabs

  • Thread starter Thread starter alm09
  • Start date Start date
You could use this function. Al + F11 to open VB editor, right click this
workbook and insert module and paste this in.

Function sheetsinbook()
sheetsinbook = Worksheets.Count
End Function

this formula in a cell will return the number of worksheets.
=sheetsinbook()

Mike
 
I would rather use the formula but it is not working. I get a #NAME? error.
Is there an input (i.e. file name) in the parentheses or is to remain null?
 
if its giving a name error then you haven't put the function it calls in the
correct place. Put the function in a module in your workbook.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top