I know how to issue a FollowHyperlink command, I was wondering if that was how you were doing it, since you did not specify. That command uses the shell to do its executes, so it will call the default browser.
To navigate to a known URL using the ActiveX WebBrowser control, the code is:
Me!nameofwebactivexcontrol.Navigate "http://yoururlgoeshere"
Here is a function that will populate a two-column, value-list combobox with URL's from the current user's favorites folder:
CODE
Public Function fncURLList(pstrPath As String) As String
Dim strName As String, strRetVal As String, strTemp As String, strURL As String
Dim intFile As Integer
strName = Dir(pstrPath, vbNormal)
Do While strName <> ""
intFile = FreeFile
Open (pstrPath & "\" & strName) For Input As #intFile
Line Input #intFile, strURL
Line Input #intFile, strURL
Close #intFile
If strURL <> "" Then
strTemp = ";" & Replace(Left(strName, Len(strName) - 4), ";", "") & ";" & Replace(Mid(strURL, 9), ";", "%3B")
If Len(strRetVal & strTemp) <= 2048 Then strRetVal = strRetVal & strTemp ' Access 2000 can only hold 2048 characters in a ValueList combobox
End If
strName = Dir
Loop
fncURLList = Mid(strRetVal, 2)
End Function
You would call it as such (in your form's open event):
Me.cboFavorites.RowSource = fncURLList(Environ("UserProfile") & "\Favorites\")
And, of course, you would need something in the AFTERUPDATE event of that combo to set the URL:
Me!nameofwebcontrol.Navigate cboFavorites.Column(1)
Note that this is really just a demo to get you started on how to do it; it ignores any folders in the favorites directory, and, since Access 2000 has a maximum of 2048 characters that can be the source of a value-list combobox, it will stop adding favorites to the list at that point. It does demonstrate a method by which this could be done; hope it is enough to get you started.