Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Displaying sheet code name and sheet name

I have changed the code name for many of the sheets in my workbook, but want
to get a listing of them. How are the code names and the sheet names coded
so that I can display them?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Displaying sheet code name and sheet name

One way

Sub ListCodeNames()
Dim sh As Object
Dim oVBMod As Object
With ActiveWorkbook.VBProject
For Each oVBMod In .VBComponents
Select Case oVBMod.Type
Case 100:
Debug.Print "Name is " &
CStr(.VBComponents(oVBMod.Properties("Codename")). _
Properties("Name")) & ", CodeName is " &
CStr(.VBComponents(oVBMod.Properties("Codename")). _
Properties("CodeName"))
End Select
Next oVBMod
End With
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I have changed the code name for many of the sheets in my workbook, but

want
to get a listing of them. How are the code names and the sheet names

coded
so that I can display them?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Displaying sheet code name and sheet name

Sub abc()
Dim sh as Worksheet
For Each sh In ThisWorkbook.Worksheets
s = "Tab Name " & sh.Name & vbNewLine _
& "Codename: " & sh.CodeName
MsgBox s
Next

End Sub

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have changed the code name for many of the sheets in my workbook, but want
to get a listing of them. How are the code names and the sheet names coded
so that I can display them?

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatically determining CODE NAME for sheet based upon Sheet Barb Reinhardt Excel Programming 14 August 15th 06 06:49 PM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
How do i copy a active sheet to a new sheet with code and everything Karill Excel Programming 2 April 11th 06 06:22 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM
unprotect sheet in code and make sheet visible peach255 Excel Programming 1 August 1st 03 03:28 AM


All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"