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 lngStringInArrayColumn(strAr() As String, intColumn As Integer, strCaption As String) As Long
' Procedure :   lngStringInArrayColumn
' Description:  Test if a string is in a specific column of an array.
' Copyright: Chris Greaves Inc.
' Inputs:       The array, the column offset, the string caption.
' Returns:      LONG. Less than zero if not found.
' Assumes:      None.
' Side Effects: None.
' Tested:       By the calls shown below.
    lngStringInArrayColumn = -1
    Dim lngIndex As Long
    For lngIndex = 0 To UBound(strAr, 1)
        If strAr(lngIndex, intColumn) = strCaption Then
            lngStringInArrayColumn = lngIndex
            Exit For
        Else
        End If
    Next lngIndex
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 lngStringInArrayColumn(strAr() As String, intColumn As Integer, strCaption As String) As Long
' Procedure :   lngStringInArrayColumn
' Description:  Test if a string is in a specific column of an array.
' Copyright: Chris Greaves Inc.
' Inputs:       The array, the column offset, the string caption.
' Returns:      LONG. Less than zero if not found.
' Assumes:      None.
' Side Effects: None.
' Tested:       By the calls shown below.
    lngStringInArrayColumn = -1
    Dim lngIndex As Long
    For lngIndex = 0 To UBound(strAr, 1)
        If strAr(lngIndex, intColumn) = strCaption Then
            lngStringInArrayColumn = lngIndex
            Exit For
        Else
        End If
    Next lngIndex
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