SysDupe123
Technical User
I have a worksheet with some text bpxes on it for user input. I am trying to set up a format so that when the user inputs a number, it shows as a percentage, i.e., user enters 30, and text box shows 30%.
I have used some VB to set other text boxes to show $ for currency fields, but I cannot seem to get it to work for percentages.
Here is the code I used for the dollar sign:
TextBox13.Value = Format(TextBox13.Value, "$#,##0")
I tried to use this:
TextBox51.Value = Format(Val(TextBox51.Value) / 100, "##%")
This ended up giving me the percent sign, right as soon as a number was entered. If I needed to type 65, it would show 6% and not take the 5. The cursor defaults to after the % and I manually have to back up to make the text box read 65%.
Any ideas?
Thanks
I have used some VB to set other text boxes to show $ for currency fields, but I cannot seem to get it to work for percentages.
Here is the code I used for the dollar sign:
TextBox13.Value = Format(TextBox13.Value, "$#,##0")
I tried to use this:
TextBox51.Value = Format(Val(TextBox51.Value) / 100, "##%")
This ended up giving me the percent sign, right as soon as a number was entered. If I needed to type 65, it would show 6% and not take the 5. The cursor defaults to after the % and I manually have to back up to make the text box read 65%.
Any ideas?
Thanks