Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found the code below on-line (writen by Dick Kusleika) which works fine if
I click on another TextBox but if I click on my Finished Button the code does not run. Any ideas what can be done to solve this proble? Private Sub TextBox7_Exit(ByVal Cancel As MSForms.ReturnBoolean) PhoneNum = Me.TextBox7.Text If Len(PhoneNum) = 7 Then FormatNum = "(360) " & Left(PhoneNum, 3) & "-" & Right(PhoneNum, 4) ElseIf Len(PhoneNum) = 10 Then FormatNum = "(" & Left(PhoneNum, 3) & ") " & Mid(PhoneNum, 4, 3) & _ "-" & Right(PhoneNum, 4) Else MsgBox "Not a Valid Phone Number" Cancel = True End If Me.TextBox7.Text = FormatNum End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
phone numbers | New Users to Excel | |||
Convert phone numbers with dashes in them to just numbers | Excel Discussion (Misc queries) | |||
Convert phone numbers with dashes in them to just numbers | Excel Discussion (Misc queries) | |||
How can I cross reference phone numbers with existing phone numbe. | Excel Discussion (Misc queries) | |||
Words > Numbers (i.e. Vanity Phone Numbers) function | Excel Worksheet Functions |