bmm,
There is no rename event of an Excel sheet. You may be able to use the
calculate event of the sheet, though. In Cell B1, use this formula:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,LEN(CELL("filename"
,A1))-FIND("]",CELL("filename",A1)))
And in cell C1, enter the current sheet name. Then use this calculate
event:
Private Sub Worksheet_Calculate()
If Range("B1").Value <> Range("C1").Value Then
Application.EnableEvents = False
MsgBox "The sheet just got renamed from" & Chr(10) & _
Range("C1").Value & " to " & Range("B1").Value & "."
Range("C1").Value = Range("B1").Value
Application.EnableEvents = True
End If
End Sub
This won't work if the workbook hasn't been saved.
HTH,
Bernie
MS Excel MVP