Logic
Logic

Reputation: 5

Get a sheet's codename using the sheet's name

I'm trying to write something where the user inputs the tab name of a worksheet in Excel and uses the tab name to get the sheet's codename before continuing through the code.

Upvotes: 0

Views: 284

Answers (1)

Shai Rado
Shai Rado

Reputation: 33692

Try something like below:

Dim ShtCodeName As String

ShtCodeName = Worksheets("YourSheetName").CodeName

Upvotes: 1

Related Questions