Sheet Rename event capture

  • Thread starter Thread starter Venkat
  • Start date Start date
V

Venkat

Hi,

Is there any event/way to know when a sheet is being renamed? I want to
capture sheet rename and execute some code. But it seems there is no way to
capture this. Is there any alternative solution for this?

Thanks in Advance.
 
Venkat said:
Is there any event/way to know when a sheet is being renamed? I want to
capture sheet rename and execute some code. But it seems there is no way to
capture this. Is there any alternative solution for this?

If you have formulas that refer to cells in every worksheet, changing
worksheet names would trigger recalculation. However, determining
whether worksheet renaming triggered recalc would be tricky since
you'd need to maintain a list of worksheets in the workbook including
the worksheet's index within the worksheet collection and its previous
name.

What sort of code are you trying to run on worksheet rename?
 
Hi

No event that I know of to do this, but you could capture the existing Sheet
name with a Sheet_Activate event.
Store this value in a temp location
Do a Compare of Sheet name against this on the Sheet_Deactivate event, and
use that test to trigger your code.
 
Back
Top