• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Percentage in userform listbox and combobox

Belleke

Well-Known Member
Hello everybody.
I have a table in a sheet with percentages 10% 20% 30% .... 100% (simple)
But when i fill a combobox and a listbox it shows as 0.1 0.2 0.3 ....1
Somebody an idea so that de combobox and listbox shows the percentages.
Thanks in advance.
 
Hi Narayank, thank you for your response:)
I will give your code a try, i found a solution tha works for me in the combobox.
Code:
Private Sub ComboBox1_Change()
ComboBox1 = Format(ComboBox1, "00%")
End Sub
But no luck with the listbox:(
Any suggestion.
Thanks.
 
Hi Narayan,
I found a solution, so the problem is solved.
this is the code
Code:
 With LB_02
        .List = [Lijst].Value
        .ColumnCount = [Lijst].CurrentRegion.Columns.Count
        .ColumnWidths = "40;150;150;60;60;50;150;150;300"
    For lindex = 0 To .ListCount - 1
        .List(lindex, 5) = (Format((.List(lindex, 5)), "00%"))
    Next
    End With
But thank you for your quick responses.
Have a nice evening.
 
Back
Top