![]() |
Listen to "rename sheet" event in excel
Hi
I'd like to create a listener on the event "sheet.name changing". It apparently does not exist in vba worksheet standard callbacks. (said in a different way I want to run a function any time a specific sheet has its name manually changed) Any idea ? Any help would be appreciated. Thanks |
Listen to "rename sheet" event in excel
Not ideal, but this will pick it up on the next cell select
Private mSheet As String Private Sub Worksheet_SelectionChange(ByVal Target As Range) If mSheet < "" Then If Me.Name < mSheet Then MsgBox "Sheet name changed from " & mSheet End If End If mSheet = Me.Name End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Ben" wrote in message oups.com... Hi I'd like to create a listener on the event "sheet.name changing". It apparently does not exist in vba worksheet standard callbacks. (said in a different way I want to run a function any time a specific sheet has its name manually changed) Any idea ? Any help would be appreciated. Thanks |
Listen to "rename sheet" event in excel
Didn't the reply Chip Pearson gave you help?
http://www.microsoft.com/office/comm...c-4d7aa9611681 Mike "Ben" wrote: Hi I'd like to create a listener on the event "sheet.name changing". It apparently does not exist in vba worksheet standard callbacks. (said in a different way I want to run a function any time a specific sheet has its name manually changed) Any idea ? Any help would be appreciated. Thanks |
All times are GMT +1. The time now is 12:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com