Hi,
The following will pad out an entry with zeros to ensure four digits are displayed:
So, if a user enters 53 for instance, 0053 will be displayed.
How would I adapt this to take into account when a letter suffix is added to a number? For example, if a user enters 53a I would like 0053a to be returned.
There will never be greater than four digits but occasionally there will be a letter suffix.
Thanks.
The following will pad out an entry with zeros to ensure four digits are displayed:
Code:
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2.Value = Format(TextBox2.Value, "0000")
End Sub
How would I adapt this to take into account when a letter suffix is added to a number? For example, if a user enters 53a I would like 0053a to be returned.
There will never be greater than four digits but occasionally there will be a letter suffix.
Thanks.