Karen Sandria
Karen Sandria

Reputation: 25

Clear drop down cell content depend on another cell value change

want clear C1 cell value (Drop down cell) after I change A2 value to grater than 2.I have list box for A2 cell change.I followed below vba code.Need to modify it.

  Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A2")) Is Nothing Then
    If Me.Range("A2").Value > 2 Then
        Range("C1").ClearContents
    End If
End Sub

Image

Upvotes: 0

Views: 275

Answers (1)

Domenic
Domenic

Reputation: 8114

Unfortunately, changes made to cell A2 by selecting an item from the listbox will not trigger the Change event.

An alternative would be to use an ActiveX listbox, where you would have the Click event available for your listbox.

Or another alternative would be to assign a macro to your listbox, as @BigBen has mentioned in his comments.

Upvotes: 3

Related Questions