ArrWebs is a two dimensional array. The first dimension contains the abbreviated name of the web site. The second dimension contains the long name of the web site.
The SetarrWebs function allows you to put a short easy to remember name for your web and also the long name with the complete path into an array.
For example I set the value of the first dimension in arrWebs(0,6) to "finley".
The name that I need to open the web is the value in the second dimension of arrWebs(1,6): "C:\Documents and Settings\rdahl\My Documents\My Web Sites\WebFamilyTree\Finley_Diamond_Jubilee"
I can now use the following expression to open the "finley" web.
WebDesigner.Webs.Open _ (arrWebs(1, GetarrWebsIndex("finley")))
The GetarrWebsIndex("finley") returns 6.
The value of arrWebs(1,6) is: "C:\Documents and Settings\rdahl\My Documents\My Web Sites\WebFamilyTree\Finley_Diamond_Jubilee"
Function SetarrWebs() _ As Boolean 'Tested 20090208 On Error GoTo errHandler1 Dim intNumberOfColumns As Integer Dim intNumberOfRows As Integer Dim strWebPath As String Dim strWFTWebPath As String 'Set initial value to False until it finishes. SetarrWebs = False intNumberOfColumns = 2 intNumberOfRows = 18 strTitle = "arrWebs Data" strWebPath = _ "C:\Documents and Settings\rdahl\" strWebPath = _ strWebPath & "My Documents\My Web Sites\" strWFTWebPath = _ "C:\Documents and Settings\rdahl\" strWFTWebPath = _ strWFTWebPath & "My Documents\My Web Sites\" strWFTWebPath = _ strWFTWebPath & "WebFamilyTree\" ReDim arrWebs(intNumberOfColumns, intNumberOfRows) arrWebs(0, 0) = "auto" arrWebs(1, 0) = strWebPath & _ "AutomationInformation" arrWebs(0, 1) = "wft" 'root folder gives complete address arrWebs(1, 1) = strWFTWebPath arrWebs(0, 2) = "barnes" arrWebs(1, 2) = strWFTWebPath & _ "Barnes_County_History" arrWebs(0, 3) = "coopcent" arrWebs(1, 3) = strWFTWebPath & _ "Cooperstown_Centennial" arrWebs(0, 4) = "coopdiamon" arrWebs(1, 4) = strWFTWebPath & _ "Cooperstown_Diamond_Jubilee" arrWebs(0, 5) = "dazey" arrWebs(1, 5) = strWFTWebPath & _ "Dazey_Centennial" arrWebs(0, 6) = "essing" arrWebs(1, 6) = strWFTWebPath & _ "Essing_och_Randklef" arrWebs(0, 7) = "finley" arrWebs(1, 7) = strWFTWebPath & _ "Finley_Diamond_Jubilee" arrWebs(0, 8) = "foster" arrWebs(1, 8) = strWFTWebPath & _ "Foster_County_Centennial" arrWebs(0, 9) = "glenfield" arrWebs(1, 9) = strWFTWebPath & _ "Glenfield_Centennial" arrWebs(0, 10) = "griggscem" arrWebs(1, 10) = strWFTWebPath & _ "Griggs_County_Cemeteries" arrWebs(0, 11) = "griggscent" arrWebs(1, 11) = strWFTWebPath & _ "Griggs_County_Centennial" arrWebs(0, 12) = "hancent" arrWebs(1, 12) = strWFTWebPath & _ "Hannaford_Centennial" arrWebs(0, 13) = "hanphot" arrWebs(1, 13) = strWFTWebPath & _ "Hannaford_Photographs" arrWebs(0, 14) = "hope" arrWebs(1, 14) = strWFTWebPath & _ "Hope_Centennial" arrWebs(0, 15) = "ndplace" arrWebs(1, 15) = strWFTWebPath & _ "North_Dakota_Place_Names" arrWebs(0, 16) = "nia" arrWebs(1, 16) = strWFTWebPath & _ "Norwegians_in_America" arrWebs(0, 17) = "steelecem" arrWebs(1, 17) = strWFTWebPath & _ "Steele_County_Cemeteries" arrWebs(0, 18) = "swedplace" arrWebs(1, 18) = strWFTWebPath & _ "Swedish_Place_Names" SetarrWebs = True Exit Function errHandler1: SetarrWebs = False 'Notify user of failure. MsgBox "SetarrWebs has failed", _ vbCritical, "Function Failure" End Function