• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro recognising a a change in a cell

Janine

New Member
Hi

I have the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("B3").Address Then
Range("Vendor").Value = ""
End If
End Sub

What I am trying to do is clear a row of cells that are drop down boxes, when B3 changes. B3 is the output cell from a ActiveX combo box and displays text

All help appreciated
 
Hi Janine

I'm not VBA savvy so I can't help you with that code.

But regarding drop down boxes, I guess you are using data validation, in which case you have to assure that the List that feeds the drop down box contains a blank value or else I don't think your macro will work.

Regards
 
Hi Tiago, the macro works fine, if I click into the cell its evaluating for the change and type something, it just doesn't recognize the change when the combo box output changes. frustrating !
 
Perhaps you are using the wrong event for what you want or perhaps you need both.
Worksheet_SelectionChange applies to the cell you are going into.
Worksheet_Change applies to the cell you are coming out of.
 
Hi Janine ,

You do not need a Worksheet_Change event procedure.

The existing ComboBox21_Change event procedure should work.

I moved your Header Information tab to a new workbook , and introduced the ComboBox21_Change event procedure in that new workbook , and the event of changing the combobox selection is recognized.

Unfortunately in your workbook it is not being recognized.

I suggest you create a new workbook , transfer all of these worksheet tabs to the new workbook , and try once more.

Narayan
 
On another note on this workbook, on the front tab I have a controls tab order, which works fine by tab down through the boxes. However other users when testing it cannot tab through them? The macros don't seem to work for anyone else but me..... I'm seriously thinking of starting again!
 
Back
Top