Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default More Then one Worksheet_Change

Is it possible to have two or more worksheet_change private subs runnin
on the same spreadsheet

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default More Then one Worksheet_Change

No. You can, however, design your single change event to take different
actions based on the cell being changed. The Target argument in the change
event will hold a reference to the cell or cells that triggered the action.
You can set up a case statement or series of if statements to match target
cell to the various cells you want to handle. For example

if not intersect(target,Range("A1:A10")) is nothing then
' changed cell is in the range A1:A10
elseif target.address = "$C$5" then
changed cell is cell C5
elseif . . . and so forth

--
Regards,
Tom Ogilvy


"pauluk " wrote in message
...
Is it possible to have two or more worksheet_change private subs running
on the same spreadsheet?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default More Then one Worksheet_Change

pauluk < wrote:

Is it possible to have two or more worksheet_change private subs running
on the same spreadsheet?


As I don't know the exact answer, I say try it and see what happens.
Otherwise, I see no need to have different subs if all the changes you
want to control can be controlled from this Event sub. If you don't want
to see a huge Worksheet_Change sub, then create other specific subs in
the sheet module and just call them from the Worksheet_change sub.

Regards,
--
Beto
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
Worksheet_Change Jive Excel Worksheet Functions 2 June 11th 07 10:03 AM
Worksheet_Change scrimmy Excel Discussion (Misc queries) 7 April 26th 07 12:12 PM
Worksheet_change won't run Eric Excel Discussion (Misc queries) 4 March 10th 05 03:43 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


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