0

I would like to paste the value of the selected content in a combobox (form control) to a cell (B12) without having to add a button triggering this event.

Here's my code;

Sub drop_down_16_change()
With Worksheets("Dashboard").Shapes("Drop Down 16").ControlFormat
Worksheets("Dashboard").Range("A12") = .List(.Value)
End With
End Sub

However, it does not work when changing selected item in the dropdownbox, only works when running the script.

Martinswe
  • 43
  • 6
  • This might be what you are looking for: https://stackoverflow.com/questions/29362456/what-event-is-triggered-when-user-selects-value-from-drop-down-combobox-activex – Warcupine Jul 10 '19 at 12:21
  • You are simply using form controls instead of ActiveX controls? In that case you can link a cell to the chosen index of the combobox. In cell `A12` you can then just put an index formula to get the corresponding value from the listrange. – JvdV Jul 10 '19 at 12:34
  • 1
    Nothing wrong with your code. You need to right click on the combobox and then click on assign macro and then select `drop_down_16_change` ;) it will now work – Siddharth Rout Jul 10 '19 at 12:45
  • Thanks , problem solved! – Martinswe Jul 10 '19 at 12:45

0 Answers0