View Single Post
  #2   Report Post  
dominicb
 
Posts: n/a
Default Assigning a value to a cell from a combox


Good morning sjayar

It really depends on how you have set up your combo box and button. If
you have done it through the control toolbox use this code attached to
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 a
bit more difficult for yourself because I think that this can be set to
return only the position of your selection (ie., 1,2,3 etc) but not the
actual combobox value. To set this, right click and select Format
Control, Control and enter a cell in the cell link box. You would then
need to use a lookuptable or something to find out the value.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=480977