How to simulate worksheet rename event

  • Thread starter Thread starter Nacho Nachev
  • Start date Start date
N

Nacho Nachev

Hello,

Has anybody invented a reasonable way through which a worksheet rename event
can be simulated at the moment of the renaming?

TIA,
Nacho
 
Hi
not really sure what you're trying to do. Do you want an event
triggered WHILE still typing the new name?
 
there's no 'viable' possibility.

what you could do if you want to be sure you can reference the correct
worksheets in your macro's it to use the "codename" property of the
worksheet (that is the name you see in Project explorer)

be aware that since the codename is not indexed, you cannot reference
a specific sheet directly like Worksheets("MySheet") you;ll have to
find it by iteration:
for each ws in worksheets
if ws.codename = "MySheet" then
exit for
next





keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Thank you! This is very nice solution and will work fine for me as I will
not need to update my internal data when a worksheet is renamed.

Kind regards,
Nacho
 
No. Just an event that will indicate that the worksheet has been renamed
immediately after the rename is completed.. I think I'll do fine with the
solution proposed by keepITcool, but for the sake of completeness I'll be
happy to know if there is a way to indicate such event.

Thanks,
Nacho
 

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

Back
Top