Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing Sheet's Name | Excel Discussion (Misc queries) | |||
how to get sheet's number it's name | Excel Discussion (Misc queries) | |||
codename help | Excel Programming | |||
Help with code that finds a sheet's name | Excel Programming | |||
Sheet's Name | Excel Programming |