Convert code name

  • Thread starter Thread starter Karen53
  • Start date Start date
K

Karen53

Hi,

If I have a list of sheets codenames saved on a worksheet, how do convert
them back to sheets(shname)?

Here's one I've tried:

Dim SheetName As String
Dim shCodeName As String

shCodeName = MainPagepg.Range("BD" & Newrow - 1).Value

AfterShName = Replace(shCodeName.Name, "'", "''")
 
Loop through the sheets in the workbook and check the codename for each one
until you get a match.
There's no fixed way to convert directly from one the the other: you could
have a "Sheet1" with codename "shtData".

Tim
 
Back
Top