The GetarrWebsIndex function accepts the abbreviated web name, such as "finley".  It will return the index number that contains the abbreviated name.

This function was called from WebsArraySet.

Function GetarrWebsIndex( _
ByVal strAbbr As String) _
As Integer
   'Tested 20090208
   'Function accepts abbreviated web name
   'and returns array index value.

   On Error GoTo errHandler1
   Dim i As Integer
   If Not SetarrWebs Then GoTo errHandler2

   For i = 0 To UBound(arrWebs, 2) - 1
      If arrWebs(0, i) = strAbbr Then

         'strAbbr was found
         GetarrWebsIndex = i
         Exit Function
      End If
   Next i

   GetarrWebsIndex = -1
   MsgBox "Could not find web " & strAbbr, _
   vbCritical, "Function Failure"

Exit Function
   errHandler1:
   'Notify user of failure.
   MsgBox "GetarrWebsIndex has failed", _
   vbCritical, "Function Failure"
Exit Function
   errHandler2:
   MsgBox "GetarrWebs has failed", _
   vbCritical, "Function Failure"
End Function					

 

Valid XHTML 1.0 Transitional        Valid CSS!