Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.



Public Function GenPhone(strPhone As String)
' Generate words from a telephone number, report all valid (spelling) words
    strPhone = strOnly(strPhone, strcDigits) ' filter out all but the decimal digits
    Call strPPA("Phone", strPhone)
    Dim strList As String
    strList = ""
    While Len(strPhone) > 0
        If strCharsFromDigit(Left(strPhone, 1)) <> "" Then
            strList = strList & strcDelimiter & strCharsFromDigit(Left(strPhone, 1))
        Else
        End If
        strPhone = Right(strPhone, Len(strPhone) - 1)
    Wend
    Call strPPA("List", strList)
    strList = strGPA("List", "")
    Call PermuteList(strList, "") ' Initial call to recurse with a null word and a full list
'Sub TESTGenPhone()
'Call GenPhone("2494564")
'Call GenPhone("4162494564")
'Call GenPhone("6219348")
'Call GenPhone("4166219348")
'Call GenPhone("6219367")
'Call GenPhone("4166219367")
'Call GenPhone("2015980")
'Call GenPhone("9052015980")
'End Sub
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1

Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.

Public Function GenPhone(strPhone As String)
' Generate words from a telephone number, report all valid (spelling) words
    strPhone = strOnly(strPhone, strcDigits) ' filter out all but the decimal digits
    Call strPPA("Phone", strPhone)
    Dim strList As String
    strList = ""
    While Len(strPhone) > 0
        If strCharsFromDigit(Left(strPhone, 1)) <> "" Then
            strList = strList & strcDelimiter & strCharsFromDigit(Left(strPhone, 1))
        Else
        End If
        strPhone = Right(strPhone, Len(strPhone) - 1)
    Wend
    Call strPPA("List", strList)
    strList = strGPA("List", "")
    Call PermuteList(strList, "") ' Initial call to recurse with a null word and a full list
'Sub TESTGenPhone()
'Call GenPhone("2494564")
'Call GenPhone("4162494564")
'Call GenPhone("6219348")
'Call GenPhone("4166219348")
'Call GenPhone("6219367")
'Call GenPhone("4166219367")
'Call GenPhone("2015980")
'Call GenPhone("9052015980")
'End Sub
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1