View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
LenB[_3_] LenB[_3_] is offline
external usenet poster
 
Posts: 4
Default prevent change sheet name

If you are going to refer to them by their codename as other have
smartly suggested, always change the codename to something other than
the default. Here's the catch (tested in Excel97). Say you have three
sheets and your program refers to codename "Sheet2". Somehow sheet2
gets deleted and a new sheet added. Tha tab name will be Sheet4, but
the code name will be Sheet2. Probably not the sheet2 that your program
refers to.

If you don't want a sheetname to change, try checking the name in the
worksheet activate and/or deactivate events, and change it back if it
has changed. Not perfect, but maybe it will work for you.

Len

helmekki wrote:
Hi there

Is there a code to protect the name of sheets ?

i donot want to let users change the name of the worksheets