Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default return sheets code name

or something similarHi,

Is there a way to return the code name of a worksheet using sheets(ShName)?
--
Thanks for your help.
Karen53
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default return sheets code name



ActiveSheet.CodeName


--
Regards,

OssieMac


"Karen53" wrote:

or something similarHi,

Is there a way to return the code name of a worksheet using sheets(ShName)?
--
Thanks for your help.
Karen53

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default return sheets code name

I re read you question and thought perhaps this is what you want.

Sheets("My sheet").CodeName

--
Regards,

OssieMac


"OssieMac" wrote:



ActiveSheet.CodeName


--
Regards,

OssieMac


"Karen53" wrote:

or something similarHi,

Is there a way to return the code name of a worksheet using sheets(ShName)?
--
Thanks for your help.
Karen53

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default return sheets code name

Yes, thank you OssieMac. The second answer is what I was looking for.
--
Thanks for your help.
Karen53


"OssieMac" wrote:

I re read you question and thought perhaps this is what you want.

Sheets("My sheet").CodeName

--
Regards,

OssieMac


"OssieMac" wrote:



ActiveSheet.CodeName


--
Regards,

OssieMac


"Karen53" wrote:

or something similarHi,

Is there a way to return the code name of a worksheet using sheets(ShName)?
--
Thanks for your help.
Karen53

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default return sheets code name

In addition to OssieMac's code.

Sub CreateListOfSheetsOnFirstSheet()
Dim ws As Worksheet
For I = 1 To Worksheets.Count
With Worksheets(1)
Set ws = Worksheets(I)
.Cells(I, 1).Value = ws.Name
.Cells(I, 2).Value = ws.CodeName
End With
Next I
End Sub


Gord Dibben MS Excel MVP

On Thu, 28 Feb 2008 18:13:07 -0800, Karen53
wrote:

Yes, thank you OssieMac. The second answer is what I was looking for.


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
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Programming 6 March 29th 06 12:43 PM
Return to individual sheets KISS Excel Worksheet Functions 3 September 8th 05 06:49 AM
run code on opening workbook and apply code to certain sheets Jane Excel Programming 7 August 8th 05 09:15 AM


All times are GMT +1. The time now is 05:38 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"