From the posts this issue seems like a real bug-bear.
I have a user form where I want users to type in a number representing a percentage and for the form to display that as a percentage (ie type in "35" and the text box shows "35%".
I have used this code:
but I get a type mismatch error - I have no idea why as i am a bit of a VBA newbie.
My text box is txtRPC.
Looking forward to enlightenment
I have a user form where I want users to type in a number representing a percentage and for the form to display that as a percentage (ie type in "35" and the text box shows "35%".
I have used this code:
Code:
Private Sub txtRPC_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtRPC.Value = Format(txtRPC / 100, "0.0%")
EnableSave
End Sub
but I get a type mismatch error - I have no idea why as i am a bit of a VBA newbie.
My text box is txtRPC.
Looking forward to enlightenment