I have a workbook with sheets having names: Student (1), Student (2), Student (3) and so on.
I am adding a sheet through vba with will be named Student (4) if there are three sheets already present. How can I identify the last sheet number (3 in this case) so I know I need to name the next sheet Student (4)?
Thanks in advance
The code below displays the largest current student number. Is this what you were after?
Warning. In my experience workbooks become very difficult to use as the number of worksheets increases. I have used one with 40 sheets and found it a nightmare. There is also a theoretical limit of 255 although I told Excel will exceed other limits before it can be reached.