How can i trap the rename event of an excel sheet?

  • Thread starter Thread starter bmm
  • Start date Start date
B

bmm

Hello,

How can i trap the rename event of an excel sheet?
Is it possible to get the renamed sheet name as soon as it'd changed?

thanks and rgds
 
There is no "rename event" in XL. If you have the Cell("filename")
function on the sheet, renaming the sheet will fire the Calculate event,
where you can check the name against a static or global variable.
 
Just to add:
Believe
=Cell("filename")

Will return the name of the activesheet, so you might want to use

=Cell("filename",A1)

the second argument can be any cell reference (on the sheet).
 
Tom -

Do you see any difference in terms of firing a Worksheet_Calculate or
Workbook_SheetCalculate event when a sheet in the workbook is renamed? I
don't with MacXL.

I was just thinking of an event trigger. If the filename is to be used,
your addition is obviously the correct one.
 
If your only intent in using cell was to trigger a calculate event, then I
guess it doesn't make any difference what value it returns.
 

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