Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Worksheet_Change(byVal target as Range)

Status
Not open for further replies.

thomasks

Programmer
May 12, 2006
113
US
I would like to be able to define the "target" as an individual cell, and not "any" cell on the worksheet.
I want some code to run only when a certain cell changes.
Can someone help me define this?
 
Test the Target.Address property in the event procedure or use the Intersect method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
dim iSect as range

set iSect = intersect(target, TestRange)

If iSect is nothing then exit sub

...continue change event

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top