Is there a way to count the number of tabs in a worksheet?
D Dave Peterson Jan 24, 2008 #2 In code??? msgbox Activeworkbook.sheets.count Is there a way to count the number of tabs in a worksheet? Click to expand...
In code??? msgbox Activeworkbook.sheets.count Is there a way to count the number of tabs in a worksheet? Click to expand...
M Mike H Jan 24, 2008 #3 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
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
A alm09 Jan 24, 2008 #4 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?
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?
M Mike H Jan 24, 2008 #5 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
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