ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to pass valve in combobox object to cell (https://www.excelbanter.com/excel-programming/279480-how-pass-valve-combobox-object-cell.html)

chanon

How to pass valve in combobox object to cell
 
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.

[email protected]

How to pass valve in combobox object to cell
 
Sheets("YourSheet").Range("A1").Value=ComboBox1.Va lue

Substitute appropriate name for ComboBox1

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
I've tried to pass value 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.



Tom Ogilvy

How to pass valve in combobox object to cell
 
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.

--
regards,
Tom Ogilvy

"chanon" wrote in message
...
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.




CHANON WANGSDAN

How to pass valve in combobox object to cell
 

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com