Public Function PNum(wrkValue As String) As String
Dim strValue As String
strValue = wrkValue
On Error GoTo PNum_Error
strValue = Replace(strValue, "(", "")
strValue = Replace(strValue, ")", "")
strValue = Replace(strValue, "-", "")
strValue = Replace(strValue, " ", "")
If (Len(strValue) = 10 And Not strValue Like "*[!0-9]*") Then
PNum = wrkValue & " resolves to valid phone " & strValue
Else
PNum = wrkValue & " Fail ***"
End If
On Error GoTo 0
Exit Function
PNum_Error:
MsgBox "Error " & Err.number & " (" & Err.Description & ") in procedure PNum of Module AWF_Related"
End Function