ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,737
- Office Version
- 2007
- Platform
- Windows
Morning,
I have a userfrom of which a TextBox7 is a telephone number.
My worksheet database in column W has the customers telephone numbers.
TextBox7 is where these telephone numbers are shown on the userform.
I enter the number on the worksheet like 01934820955 & the cells format changes it to 01934 820955
BUT
When you look at the userform you will see 1934820955
If however you type on the worksheet 01934 820955 then the userform also shows 01934 820955
I see that the userform doesnt apply the format like the worksheet does.
Please can you advise how i format the TextBox7 to show the telephone number like the worksheet.
I have tried this below but that didnt work BUT it also didnt show me an error message ??
I have a userfrom of which a TextBox7 is a telephone number.
My worksheet database in column W has the customers telephone numbers.
TextBox7 is where these telephone numbers are shown on the userform.
I enter the number on the worksheet like 01934820955 & the cells format changes it to 01934 820955
BUT
When you look at the userform you will see 1934820955
If however you type on the worksheet 01934 820955 then the userform also shows 01934 820955
I see that the userform doesnt apply the format like the worksheet does.
Please can you advise how i format the TextBox7 to show the telephone number like the worksheet.
I have tried this below but that didnt work BUT it also didnt show me an error message ??
Code:
Private Sub TextBox7_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox7.Text = Format(TextBox7.Text, "00000 000000")
End Sub