Unable to use Application.Hyperlink in ArcMap?

585
2
Jump to solution
02-06-2012 03:02 AM
HalilSiddique
Occasional Contributor II
Hi all,
In my application i have a text box which is populated with a weblink, I have found some code which "should" allow me to click on it and open the link, but I get the following error
"438: Object doesn't support this property of method".

Is it not possible to use hyperlinks?

This is the code i am using for that text box.

Private Sub txtDeveloperWebsite_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)    Dim strDevWebsite As String    On Error GoTo Error_OLEUnbound1    ' Set reference to hyperlink address.    strDevWebsite = txtDeveloperWebsite.Text    ' Follow hyperlink address.    Application.FollowHyperlink strDevWebsite, , True Exit_OLEUnbound1:    Exit Sub Error_OLEUnbound1:    MsgBox Err & ": " & Err.Description    Resume Exit_OLEUnbound1 End Sub


I'm using ArcGIS 9.3.1

Thanks
0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor
Halil,

Looking at your sample code I believe the sample you have found is specific to MS Access. If you want to open a website using VBA in ArcMap 9.3 use this code instead:

Dim iE As Object Set iE = CreateObject("InternetExplorer.Application") iE.navigate "www.rivex.co.uk" iE.Visible = True


Duncan

View solution in original post

0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
Halil,

Looking at your sample code I believe the sample you have found is specific to MS Access. If you want to open a website using VBA in ArcMap 9.3 use this code instead:

Dim iE As Object Set iE = CreateObject("InternetExplorer.Application") iE.navigate "www.rivex.co.uk" iE.Visible = True


Duncan
0 Kudos
HalilSiddique
Occasional Contributor II
Halil,

Looking at your sample code I believe the sample you have found is specific to MS Access. If you want to open a website using VBA in ArcMap 9.3 use this code instead:

Dim iE As Object
Set iE = CreateObject("InternetExplorer.Application")
iE.navigate "www.rivex.co.uk"
iE.Visible = True


Duncan


Perfect, thanks Duncan.
0 Kudos