Looking to count sheets in a workbook, subtracting 1 from the total in VBA.![]()
Looking to count sheets in a workbook, subtracting 1 from the total in VBA.![]()
Hi and welcome
Perhaps https://www.automateexcel.com/how-to/count-worksheets/
![]()
Dim x As Long, y As Long x = Sheets.Count y = x - 1 MsgBox (x & " Sheets") MsgBox (y & " Total sheets less 1")
Hi,
like this:
![]()
Sub test() nr = ThisWorkbook.Sheets.Count - 1 MsgBox nr End Sub
BR, Alexandra
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks