question about triggering macro when value of cell changes

ces005

Board Regular
Joined
Mar 13, 2006
Messages
189
Hi,

I have a cell (D3). When the cell's value changes, I want a macro to be run. It is a picklist (data validation is tied to a list). How do I do this? Thanks.

-Eileen
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,873
Hi Eileen

You can use the worksheet Change Event

Paste this code in the respective worsheet module:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$D$3" Then

    ' run your code

End If
End Sub

Add your code.

Hope this helps
PGC
 

Watch MrExcel Video

Forum statistics

Threads
1,118,709
Messages
5,573,735
Members
412,550
Latest member
soking
Top