Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default Using a sheet's 'Codename'

How can I use a sheet's 'Codename' to do something like select a sheet in
the application, or put a number in the sheet's cell A1?

I am looking for a way of refering to a specific sheet regardless of its
name or position (you know how users like to change these things).

thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default Using a sheet's 'Codename'

On Fri, 31 Jul 2009 07:01:30 +0100, "Michelle"
wrote:

How can I use a sheet's 'Codename' to do something like select a sheet in
the application, or put a number in the sheet's cell A1?

I am looking for a way of refering to a specific sheet regardless of its
name or position (you know how users like to change these things).

thanks

M



Try this:

Sheet1.Cells(1, "A") = 17

It will work even if Sheet1 has been renamed.

Here is some more information about CodeName

http://www.ozgrid.com/VBA/excel-vba-sheet-names.htm

Hope this helps / Lars-Åke
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
Printing Sheet's Name Gingit Excel Discussion (Misc queries) 7 November 10th 08 09:13 AM
how to get sheet's number it's name alekm Excel Discussion (Misc queries) 2 January 30th 07 11:32 AM
codename help Gary Keramidas Excel Programming 14 October 31st 05 12:32 AM
Help with code that finds a sheet's name KimberlyC Excel Programming 3 July 10th 05 10:08 PM
Sheet's Name Martín2626 Excel Programming 8 January 29th 04 02:51 PM


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