ComboBox Help (Again...)

Ampleford

Active Member
Joined
Mar 26, 2002
Messages
380
Hi - I've now got my UserForm working, along with the ComboBoxes and the Command Buttons and I'm delighted with the functionality it adds EXCEPT the Data on the RowSource list for both the ComboBoxes is formatted to two decimal places, and it puts them in that format on the spreadsheet, but when they're in the ComboBoxes themselves during selection - they're not formatted - Can I format them within there so there's a consistency about the look?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I have been working with combo boxes recently, what is the data in question? and how do you want it to look?

Colin.
 
Upvote 0
can you tell me how to add combo box to the whole column rather than a particular cell... right now i'm just adding combobox to each cell in a column. can i do it in a combined manner...
 
Upvote 0
Goldglare,
I am not sure what you are asking. Do you want the Cbox (?) on a worksheet or userform? and what are you doing with it once it is populated?
Can you provide more info.

Colin.
 
Upvote 0
i want a combobox in a worksheet...after i select the values from the combobox it should be automatically updated in another worksheet which is called Cycle Control Sheet...
 
Upvote 0
So, you want to choose a value in the combo box and then another WS updates from the value you have chosen?

If that is correct, would a validation list not be better and then on the'other' WS use VLOOKUP?

I sugested a validation list list because they are easier to setup than combo boxes (well, I think they are)

If that is correct and you need help setting them up post back.

Colin
 
Upvote 0
I'm kind of lost now....

My ComboBox is within a UserForm. It draws it's RowSource from a named list on the spreadsheet, and drops a figure onto another cell in the spreadsheet. Both of these are formatted into two decimal places, but when you view them in the ComboBox / UserForm, they have no formatting (1.00 appears as 1, 1.50 as 1.5 etc)

It's just about consistency of approach and appearance if you get my point.
 
Upvote 0
Ampleford said:
I'm kind of lost now....

My ComboBox is within a UserForm. It draws it's RowSource from a named list on the spreadsheet, and drops a figure onto another cell in the spreadsheet. Both of these are formatted into two decimal places, but when you view them in the ComboBox / UserForm, they have no formatting (1.00 appears as 1, 1.50 as 1.5 etc)

It's just about consistency of approach and appearance if you get my point.

Try eg:

Code:
Private Sub ComboBox1_Change()
    ComboBox1.Value = Format(ComboBox1.Value, "0.00")
End Sub
 
Upvote 0
Morning,
One sugestion is format the named list as text, the combo box will read it exactly as it appears on your ws. Then format the destination cell to two decimal places.

It probably isn't the ideal solution, but the userform is just the front end and if it 'appears to look right', then fine. All the calculations are being done 'behind' the front end with the correct formatting.
I have used this solution for time values and it works OK.

HTH
Colin.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,008
Members
448,935
Latest member
ijat

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
Back
Top