Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how to eliminate E-mail "To" & "CC" boxes at top of Excel Sheet BillFitz Excel Discussion (Misc queries) 10 March 24th 08 11:42 AM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
How to listen to "rename sheet" Ben[_12_] Excel Programming 2 July 17th 07 07:09 PM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"