Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Can Worksheet_Change be placed somewhere "universal"?

I have a workbook with many tabs, and the number often changes. Most
of these tabs have columns that need to call code when certain cells
change. The code in incorporated into another workbook that is always
opened.

I call the code by placing a Worksheet_Change event hander VBA macro
in every sheet. The problem is that if the macro changes, say it moves
to a different workbook or the API changes, I have to go to all of the
sheets and change the code that calls it.

Can I put this event handler somewhere else? Does the _change message
"bubble up" to some higher layer, like ThisWorkbook?

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Can Worksheet_Change be placed somewhere "universal"?

Hi

You can use a Workbook_SheetChange event.

The code is to be in the code sheet for ThisWorkbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'Your code
End Sub

Hopes this helps.

---
Per

"Maury Markowitz" skrev i meddelelsen
...
I have a workbook with many tabs, and the number often changes. Most
of these tabs have columns that need to call code when certain cells
change. The code in incorporated into another workbook that is always
opened.

I call the code by placing a Worksheet_Change event hander VBA macro
in every sheet. The problem is that if the macro changes, say it moves
to a different workbook or the API changes, I have to go to all of the
sheets and change the code that calls it.

Can I put this event handler somewhere else? Does the _change message
"bubble up" to some higher layer, like ThisWorkbook?

Maury


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Can Worksheet_Change be placed somewhere "universal"?

Thank you!
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
Worksheet_Change Triggers on "Delete" but not on Data Entry OssieMac Excel Programming 0 April 12th 07 09:42 PM
How so I make a "Worksheet_Change Event" to show cell changes in Excel? susiecmore Excel Programming 1 April 26th 06 06:41 PM
How do I make a "Worksheet_Change event" to show any changes to cells? [email protected] Excel Worksheet Functions 2 April 26th 06 06:28 PM
Worksheet_Change Event "Circular Reference" Vyyk Drago Excel Programming 2 July 19th 03 03:31 PM


All times are GMT +1. The time now is 02:15 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"