Convert code name

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, "'", "''")
 
T

Tim Williams

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top