I have textbox1 in a user form and I want it to format the numbers that the user puts in to this. ##:## but I can't get this to work. Can someone please help me. TIA
The easiest way is to use the TextBox controls AfterUpdate event. This will cause the
contents of the field to be formatted/reformatted as you require when the user leaves the
field. It's not practical to try and format the field while they are editing it. Add
this code to your UserForm:
Private Sub TextBox1_AfterUpdate()
TextBox1.Text = Format$(TextBox1.Text, "#0.##")
End Sub