View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default How to uniquely identify worksheet

you can refer to the object directly, irrespective of its label
change the name sat from Sheet1 to shMain
in your code

with ShMain
.Range("A1") =.Name
end with



"Vinit" wrote:

Hi friends,

I want to uniquely identify the worksheets in my workbook. I am writing
an add in using VC++. I cant access "CodeName" property of worksheet
using VC++ bcoz it always return blank. The problem in using "Name"
of worksheet is that user can change it any time. There is no event in
excel to keep track of the name change of worksheet. Even I cant use
Worksheets(Index) b'coz sequence can be changed.

Please help me to solve this.

With Best Wishes & Regards,