I have a problem with Formatting text boxes that I'm racking my brain over.
I am trying to format the text boxes to allow only a five digit number for zip code and phone number and can't seem to get it to work. The answer may be simple but I can't seem to find it.
Here is the following code for the zip code. And if you could provide one for a phone number (###)-###-#### is the format I'm looking for , it would be greatly appreciated.
I am trying to format the text boxes to allow only a five digit number for zip code and phone number and can't seem to get it to work. The answer may be simple but I can't seem to find it.
Here is the following code for the zip code. And if you could provide one for a phone number (###)-###-#### is the format I'm looking for , it would be greatly appreciated.
Code:
Private Sub Txtzip_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TxtZip.Value = WorksheetFunction.Text(TxtZip.Value, "00000")
End Sub