Assigning a value to a cell from a combox

S

sjayar

Hi all,

I have a 2 combobox and a button in my work sheet

On click of this button,
*the values in combobox must be assigned to a cell*
(assume h8 and h9).

can any one please help me to solve this problem.
 
D

dominicb

Good morning sjayar

It really depends on how you have set up your combo box and button. I
you have done it through the control toolbox use this code attached t
your button (double click on the button to open up the code window).

Range("H8").Value = ComboBox1.Value
Range("H9").Value = ComboBox2.Value

If you are doing it through the forms toolbar then you're making life
bit more difficult for yourself because I think that this can be set t
return only the position of your selection (ie., 1,2,3 etc) but not th
actual combobox value. To set this, right click and select Forma
Control, Control and enter a cell in the cell link box. You would the
need to use a lookuptable or something to find out the value.

HTH

Dominic
 

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