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 boolMatchWords(str1 As String, str2 As String, strDelim As String)
' Procedure :   boolMatchWords
' Description:  Match two strings to word boundaries.
' By:           Chris Greaves Inc.
' Inputs:       String (first) to be extended and matched.
'               String (second) to be matched.
'               String delimiter.
' Returns:      Boolean if matched.
' Assumes:      Nothing
' Side Effects: None.
' Tested:       by the calls shown below.
    If Mid(str1 & strDelim, Len(str2) + 1, 1) = strDelim Then
        If UCase(Left(str1, Len(str2))) = UCase(str2) Then
            boolMatchWords = True
        Else
            boolMatchWords = False
        End If
    Else
        boolMatchWords = False
    End If
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 boolMatchWords(str1 As String, str2 As String, strDelim As String)
' Procedure :   boolMatchWords
' Description:  Match two strings to word boundaries.
' By:           Chris Greaves Inc.
' Inputs:       String (first) to be extended and matched.
'               String (second) to be matched.
'               String delimiter.
' Returns:      Boolean if matched.
' Assumes:      Nothing
' Side Effects: None.
' Tested:       by the calls shown below.
    If Mid(str1 & strDelim, Len(str2) + 1, 1) = strDelim Then
        If UCase(Left(str1, Len(str2))) = UCase(str2) Then
            boolMatchWords = True
        Else
            boolMatchWords = False
        End If
    Else
        boolMatchWords = False
    End If
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