Hi,
I have a textbox in an excel userform and want the display to be formatted. When "9.1" is entered "9.100" shows either before or after going to the next textbox on userform.
The code below is not working.
Thanks Sandy
Hi,
I have a textbox in an excel userform and want the display to be formatted. When "9.1" is entered "9.100" shows either before or after going to the next textbox on userform.
The code below is not working.
Thanks Sandy
Re: Textbox Format In Userform
Hi Simon,
Tried that code thanks, but it did not work. I entered 9.1 and it showed 9.1 not 9.100.
It should be like a formatted cell in the spreadsheet, where all the zeros are added after hitting the enter key or if more than 3 decimals are entered the display rounds off.
Any other suggestions?
Sandy
Re: Textbox Format In Userform
The use of the UserForm_initialize will ONLY work if the TextBox has a default value set. To format the numbers after entry, use the Exit Event of the TextBox.
Re: UserForm Textbox Format For Numbers
Thanks Dave, works well.
Sandy
Don’t have an account yet? Register yourself now and be a part of our community!