A
Alan
I`m pretty new to VBA in Excel. What I`m trying to do is to
trigger a macro when the user changes a value in a particular column
(uses a drop-down list).
I created the following macro in VBE by double-clicking on "This
Workbook", clicking on "(General)" in the left drop-down of the bottom
window, and selecting "Workbook Change" in the right drop-down list.
The macro is:
Private Sub Workbook_Change(ByVal target As Range)
If target.Column = 9 Then MsgBox "OK"
End Sub
I also tried putting quotes around the 9 ("9") and using the
letter of the column ("I").
The result is that nothing happens when I make a new selection in
the drop-down list in that column. I only have one worksheet, and it
is active.
What am I missing? Thanks, Alan
trigger a macro when the user changes a value in a particular column
(uses a drop-down list).
I created the following macro in VBE by double-clicking on "This
Workbook", clicking on "(General)" in the left drop-down of the bottom
window, and selecting "Workbook Change" in the right drop-down list.
The macro is:
Private Sub Workbook_Change(ByVal target As Range)
If target.Column = 9 Then MsgBox "OK"
End Sub
I also tried putting quotes around the 9 ("9") and using the
letter of the column ("I").
The result is that nothing happens when I make a new selection in
the drop-down list in that column. I only have one worksheet, and it
is active.
What am I missing? Thanks, Alan