Formating Combo Boxes

S

Smonczka

I have a combo box that references a range. Both the range and the
linked cell are formated for 00%. The drop down list in the combo box
shows 10%,20%,30%. But everytime i select on of the items from the
dropdown list I return a value of .1,.2 or .3 depending on what I
selected. I have looked through the forums but have been unable to
locate a fix for this. Can someone please help me.

Thanks
Steve Monczka
 
G

Guest

Steve,
Try this:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "00%")
....... ' any other code
End Sub

Change the "00%" to "00.%" if you want a decimal place

HTH
 
G

Guest

Oops - should be "00.0%"

Toppers said:
Steve,
Try this:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "00%")
...... ' any other code
End Sub

Change the "00%" to "00.%" if you want a decimal place

HTH
 
S

Smonczka

Toppers, thanks but that didn't work either.

The real problem seems to be that I am not formating the Combobox. No
matter what I format the linked cell I still don't seem to change the
combobox formating.

Steve
 
S

Steven Monczka

Thank you, thank you, thank you!

This was driving me nuts. It worked perfectly.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top