How to pass valve in combobox object to cell

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.
 
P

pfsardella

Sheets("YourSheet").Range("A1").Value=ComboBox1.Value

Substitute appropriate name for ComboBox1

HTH
Paul
 
T

Tom Ogilvy

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.
 
C

CHANON WANGSDAN

Thank you for all comment. I appreciate for rapidly answer everyone give
to me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top