Worksheet CodeName property

P

PO

Hi

I have a workbook with 12 worksheets. I need a way to uniquely identify each
worksheet in my vba code.
The following is true:

1. The user can change the worksheet tab name.
2. The workbook will run under different language versions of Excel. For
instance the codename for Sheet1 is "Blad1" (I'm running the Swedish version
of excel). What would happen to the CodeName if the workbook is opened on a
pc running the Finnish version of Excel. Will CodeName still be "Blad1"?
3. Sheets can be added (but never removed)
4. The display order of the worksheets can be changed by the user (dragging
the worksheet tab to another position)

Can I use the CodeName property to uniquely identify each worksheet in my
workbook? Or is there another, better, way to do this?

TIA
Pete
 
C

Charles Williams

Codename should work OK, or I prefer to use a hidden name local to each
worksheet because then I am using my own name rather than Excel's Codename.

Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top