PC Review


Reply
Thread Tools Rate Thread

Displaying sheet code name and sheet name

 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      9th Oct 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      9th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:1DD60E5D-0520-49C0-960B-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      9th Oct 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to code Macro to Copy fron one sheet and paste in other sheet kay Microsoft Excel Programming 3 25th Jul 2008 06:46 PM
Programmatically determining CODE NAME for sheet based upon Sheet =?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?= Microsoft Excel Programming 14 15th Aug 2006 06:49 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi Microsoft Excel Programming 1 2nd May 2004 03:50 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Microsoft Excel Programming 1 5th Mar 2004 09:10 AM
unprotect sheet in code and make sheet visible peach255 Microsoft Excel Programming 1 1st Aug 2003 03:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 PM.