Selection in combobox populate a cell with number? VBA

fedi4

New Member
Joined
Apr 8, 2013
Messages
6
Hi everyone!

What do I cod instead of Range("L5").Value2 = ComboBox3.Value

Based on the selection in the combobox 3 it populate the cell “L5” with the contents of combobox 3, but what I want it to do is to populate a number that is name ranged to the selection in the combobox 3.
Combobox 3 selection is green but I would send 40 to the cell “L5”?

Code:
Sub WorkSheet_Activate()
 
Worksheets(1).OLEObjects("ComboBox1").ListFillRange = "Data"
ComboBox1.ListIndex = 0
 
End Sub

Private Sub ComboBox1_Change()
Me.ComboBox2.Value = ""
Me.ComboBox2.ListFillRange = Me.ComboBox1.Value
End Sub

Private Sub ComboBox2_Change()
Me.ComboBox3.Value = ""
Me.ComboBox3.ListFillRange = Me.ComboBox2.Value
End Sub

Private Sub ComboBox3_Change()

Range("L5").Value2 = ComboBox3.Value
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Watch MrExcel Video

Forum statistics

Threads
1,123,258
Messages
5,600,568
Members
414,389
Latest member
MarkElla

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top