Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet_Change | Excel Worksheet Functions | |||
Worksheet_Change | Excel Discussion (Misc queries) | |||
Worksheet_change won't run | Excel Discussion (Misc queries) | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming |