View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JLatham JLatham is offline
external usenet poster
 
Posts: 2,203
Default sheet numbering system

Generally I wouldn't worry about how they show up in the VBA project window
as long as you're referencing them in code/on worksheets by the names on the
tabs themselves. As for what scheme Excel uses to come up with the names -
what can I say other than Excel works in mysterious ways at times.

"Russ" wrote:

I have code that copies a worksheet (like a template but I don't use a
template), places it at the end and then renames it. Other code deletes
sheets. Everything is working fine but I notice that the sheets are numbered
in a strange way. There are only about 40 sheets but in the VBA Project View
I see sheets with names like:
sheet51(xxxxxx)
sheet510(yyyyyyy)
sheet52(wwwww)
sheet522(zzzzz)
How does Excel assign numbers to newly created sheets? Should I just
ignore the numbers since over the life of the workbook I will never create
more than a few hundred?
--
russ