Excel VBA: What Sheet is that?

There is only one way to know exactly what a sheet’s name is so you can refer to it by that name regardless of what the tab says. That is to view the Visual Basic Editor and select your project in the Project Explorer. Here you will see each sheet listed by name with the sheet tab name in brackets after it.
If you want to refer to a sheet by name in your VBA code use the sheet name at the left (not the one in brackets) in the Project Explorer.
This will ensure that you always use the exact sheet that you expect to be using in your Visual Basic application.
Labels: Excel, Sheet names in code, VBA
