Formatting textbox to ##0.00

  • We have userform which is contains dropdowns and textboxes. The interface is set up to move from one box to another by pressing the enter key.


    The format in one of these textboxes is presently #,##0. What code to I use to change the format to #.##0.00 and in which event to I put it (e.g. Userform intialize event, textbox enter event, etc).


    Thanks

  • You generally put it in the Leave/Exit/LostFocus event


    Code
    TextBox.Text = Format(TextBox.Text, "#.##0.00")

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!