The easiest way, and most efficient way to do this would be to use a regular expression. First, add this to the top of your file:
CODE
Imports System.Text.RegularExpressions
Then use a regular expression to make sure the phone number is in the correct format, like so:
CODE
Public Function ValidatePhone(ByVal num As String) As Boolean
'create our regular expression pattern
Dim pattern As String = "^[1-9]\d{2}-[1-9]\d{2}-\d{4}$"
'create our regular expression object
Dim check As New Regex(pattern)
Dim valid As Boolean = False
'Make sure a phone number was provided
If Not String.IsNullOrEmpty(num) Then
valid = check.IsMatch(num)
Else
valid = False
End If
Return valid
End Function
Then to use the Function, do that like so:
CODE
If Not ValidatePhone(TextBox1.Text) Then
MsgBox("Phone Numbers must be in a ###-###-#### format")
TextBox1.Text = ""
TextBox1.Focus()
Else
'Do somthing else
End If
Hope this helps, and it's a lot less code

Happy Coding!