0
votes

Cant seem to find the answer to this, I need a combobox (which is inside a userform) that has three selection eg Rental,Purchase and Finance

Which the selected input is then put into example cell A1. I know how to do this if I have the list already on my excel sheet, but I don't want the list on the excel sheet only the selection. so I suppose I'm asking for a coded list of option inside the module which then outputs the result in to a cell.

Any help would be appreciated (I'm a Newbie)

Thanks

1

1 Answers

0
votes

Basic code in the userform:

Private Sub ComboBox1_Change()
   If me.combobox1.listindex > -1 then sheets("Sheet name").Range("A1").value = me.combobox1.Value
End Sub

Private Sub UserForm_Initialize()
    Me.ComboBox1.List = Array("Rental", "Purchase", "Finance")
End Sub