Event of the dropdownbox in a cell
You can't capture the event of clicking the item in the dropdown box per se
(except perhaps with complex API code) but, for most versions of Excel past
xl97, you can capture the worksheet change event that is triggered when a
selection is made. You need to disable and reenable events in your code else
the act of populating the cells will cause a loop. Code example:
Private Sub Worksheet_Change(ByVal Target As Range)
With Application
.EnableEvents = False
With Target
Cells(.Row, Columns.Count). _
End(xlToLeft)(1, 2) = .Value
End With
.EnableEvents = True
End With
End Sub
Regards,
Greg
"Man Utd" wrote:
I have made a dropdonwbox in a cell by defining a validation list to the
cell.
Is it possible to catch the event when the user select an item in the
dropdownbox? I want to fill up other cells in the same row when it happens.
|