Export (0) Print
Expand All

Visual Basic Reference

Visual Studio 6.0

Hyperlink Object

See Also    Example    Properties    Methods    Events

Using the properties and methods of the Hyperlink object, your ActiveX document or ActiveX control can request a hyperlink-aware container, such as Microsoft Internet Explorer, to jump to a given URL.

Remarks

Use the NavigateTo method to jump to a URL. For example, the following code presumes an ActiveX document named "axdMyDoc" exists:

UserDocument.Hyperlink.NavigateTo _
"c:\mydocs\axdmydoc.vbd" 

If your ActiveX document is contained by a hyperlink-aware container (such as Internet Explorer), and if the container maintains a history of documents, use the GoBack or GoForward methods to go backwards or forwards through the list. However, be sure to use error-checking, as shown in the example below:

Private Sub cmdGoForward_Click()
   On Error GoTo noDocInHistory
   UserDocument.Hyperlink.GoForward
   Exit Sub
noDocInHistory:
   Resume Next
End Sub
Show:
© 2015 Microsoft