I have a process that needs to take data from one worksheet to another. The secnod worksheet is created in code and renamed. However, the sheet name can be anything like "Sheet#". However, since the worksheet that is added can be any sheet number, how do I determine what the sheet number is so I can refer to it in code? That is, the new sheet's internal name can be say, Sheet16, but its tab name woudl be Sheet9 - which can be the internal name of an existing worksheet. So, I need to determine the internal sheet name of the newly added worksheet.
Public Sub CreateWorksheet(strTabName)
'Each month creates a new worksheet
Dim strSheetName As String
strSheetName = strTabName
Sheets("Sheet8").Name = strTabName