ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert code name (https://www.excelbanter.com/excel-programming/406904-convert-code-name.html)

Karen53

Convert code name
 
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, "'", "''")
--
Thanks for your help.
Karen53

Tim Williams

Convert code 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



"Karen53" wrote in message
...
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, "'", "''")
--
Thanks for your help.
Karen53





All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com