Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
how to eliminate E-mail "To" & "CC" boxes at top of Excel Sheet | Excel Discussion (Misc queries) | |||
Excel "Move or Copy" and "Delete" sheet functions | Excel Worksheet Functions | |||
How to listen to "rename sheet" | Excel Programming | |||
Please add a "sheet" function like "row" and "column" functions | Excel Programming |