ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Change Event triggered off specific cell (https://www.excelbanter.com/excel-programming/300581-worksheet_change-event-triggered-off-specific-cell.html)

ExcelMonkey[_142_]

Worksheet_Change Event triggered off specific cell
 
I know how to use Worksheet Change events. But I do not know how t
trigger them off a specific cell. The following works off a change i
any cell.

Sub Worksheet_Change(ByVal Target As Excel.Range)

Call ProcedureA

End Sub

How do I edit this so that is triggers off a specific cell?

Thank

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


Rob Bovey

Worksheet_Change Event triggered off specific cell
 

See my answer to your question below.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"ExcelMonkey " wrote in message
...
I know how to use Worksheet Change events. But I do not know how to
trigger them off a specific cell. The following works off a change in
any cell.

Sub Worksheet_Change(ByVal Target As Excel.Range)

Call ProcedureA

End Sub

How do I edit this so that is triggers off a specific cell?

Thanks


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




mudraker[_253_]

Worksheet_Change Event triggered off specific cell
 
ExcelMonkey

You can not have it trigger off a particular cell.

You need to test the target.address


if target.address ="$A$1" then
do something
end if

also look at using Intersect to test your targe

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



All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com