Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
David,
you'll have to add some errorhandling yourself, but this works for me: Sub tst() MsgBox Code2Name(ActiveWorkbook, "sheet2") End Sub Function Code2Name(wb As Workbook, sCodeName As String) Dim c As New Collection, sh For Each sh In wb.Sheets c.Add sh.Name, sh.CodeName Next Code2Name = c(sCodeName) End Function keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "David Copp" wrote: Greetings, I've got a worksheet codename (activeworkbook.activesheet.codename) and wish to use it to determine if the worksheet exists at a later point in time. Presuming I've stored the codename, looking for a way to see if worksheet exists (i.e. open) without knowing it's "friendly" name or worksheet index. Any ideas? Is it possible to get "friendly" name from codename? (then check friendly name) Other methods welcome. Thanks, Dave |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checking for the existence of a worksheet | Excel Discussion (Misc queries) | |||
How do I check for existence of a worksheet? | Excel Worksheet Functions | |||
Referencing worksheet CODENAME in a chart object. | Excel Discussion (Misc queries) | |||
Worksheet codename | Excel Programming | |||
How do I determine the Acrobat Distiller codename? | Excel Programming |