Table of contents
TOC
Collapse the table of content
Expand the table of content

Hyperlink.AddToFavorites Method (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The AddToFavorites method adds a hyperlink address to the Favorites folder.

Syntax

expression. AddToFavorites

expression A variable that represents a Hyperlink object.

Return Value

Nothing

Remarks

When applied to a Control object, the AddToFavorites method adds the hyperlink address contained in a control to the Favorites folder.

Example

The following example sets the HyperlinkAddress property of a command button. When the user clicks the command button, the address is added to the Favorites folder by using the AddToFavorites method.

To try this example, create a new form and add a command button named Command0. Paste the following code into the form's module. Switch to Form view and click the command button.

Private Sub Form_Load() 
 Me!Command0.HyperlinkAddress = "http://www.microsoft.com/" 
End SubPrivate Sub Command0_Click() 
 Me!Command0.Hyperlink.AddToFavorites 
End Sub

See also

Concepts

Hyperlink Object

© 2018 Microsoft