creating a value based on combo box selection

unityjon

New Member
Joined
Jan 12, 2005
Messages
45
in a 'user form' I am trying to give a text selection a numerical value so i can perform a calculation with it elsewhere, my combo box has 10 entries held in a range (resourceTime) on a separate worksheet lets say ".5 day","1 day", "2 Day"etc.. When the combo box selection is "0.5 Day" i need to generate a value of "1" and so on (1 day="2", 2 day="3" etc)

Things i have tried - i have made the combo box dual column and only display the "text" rather than the numbers and extended the range to the adjacent column with numbers 1-10 but for the life of me i cannot create the code to do the sum and display the results in a textbox and place the result into a worksheet


i think the code should be something along the lines of:
Code:
Private Sub textbox4_Change()
Dim totalScore as Integer
Me.textbox4.textvalue = (Me.textbox11 + Me.textbox12 + Me.textbox13 + Me.combobox1.column(1))

End sub

or something along those lines ??

P.S i'm very new to this !! (hence asking for assistance
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Watch MrExcel Video

Forum statistics

Threads
1,133,148
Messages
5,657,109
Members
418,355
Latest member
michaelirl

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