How to pass valve in combobox object to cell

  • Thread starter Thread starter chanon
  • Start date Start date
C

chanon

I've tried to pass valve that select from combobox list in
event name "DropDown1_Change" to any cell but not success.
For combobox object on excel form ( not in VBA toolbar )
seem has no any property or method ( exclude input range,
cell link and dropdown line )

If anyone know how to solve this problem please let me know
Thank you very much in advance.
 
Sheets("YourSheet").Range("A1").Value=ComboBox1.Value

Substitute appropriate name for ComboBox1

HTH
Paul
 
Sounds like this is a dropdown from the forms toolbar.

In a general module, put in code like this

Public Sub DropDown1_Change()
Dim drpdwn as DropDown
set drpdwn = ActiveSheet.DropDowns(Application.Caller)
With drpdwn
Activesheet.Cells(1,1).Value = .List(.ListIndex)
End With
End sub

right click on your combobox and choose assign macro. Assign the above
macro.
 
Back
Top