ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do you create labels that hyperlink on forms (https://www.excelbanter.com/excel-discussion-misc-queries/154237-how-do-you-create-labels-hyperlink-forms.html)

gbpg

how do you create labels that hyperlink on forms
 
I know in Access I can create labels in forms that hyperlink to where ever I
want. Can you do this in Excel forms?

Dave Peterson

how do you create labels that hyperlink on forms
 
Like in a userform?

You can add a label to the userform. And use its click event:

Option Explicit
Private Sub Label1_Click()
ThisWorkbook.FollowHyperlink Address:="http://www.microsoft.com"
End Sub

You could even format the text in that label to look more like a hyperlink
(blue/underlined).

gbpg wrote:

I know in Access I can create labels in forms that hyperlink to where ever I
want. Can you do this in Excel forms?


--

Dave Peterson

gbpg

how do you create labels that hyperlink on forms
 
Cheers,Thanks I will try.

"Dave Peterson" wrote:

Like in a userform?

You can add a label to the userform. And use its click event:

Option Explicit
Private Sub Label1_Click()
ThisWorkbook.FollowHyperlink Address:="http://www.microsoft.com"
End Sub

You could even format the text in that label to look more like a hyperlink
(blue/underlined).

gbpg wrote:

I know in Access I can create labels in forms that hyperlink to where ever I
want. Can you do this in Excel forms?


--

Dave Peterson



All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com