ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hyperlink in excel vba (https://www.excelbanter.com/excel-programming/355292-hyperlink-excel-vba.html)

sweet_dreams

hyperlink in excel vba
 
Hi all,

I was trying to create hyperlink to other sheet in excel I did it like
that:

Sheets(2).Activate
Range("a2").Hyperlinks.Add Range("a2"), "", "Control list", , "List"

but it doesn't work.

Can U tell me what's wrong???

regards,
sweet_dreams


[email protected]

hyperlink in excel vba
 
You may also want to check if your named range "Control list" is valid.

If you were trying to link to a worksheet then it looks like this:

Sheet1.Range("a2").Hyperlinks.Add Range("a2"), "", "MySheet!A1", "My
Hyperlink"

If you were trying to jump to a web page then use this:

Sheet1.Range("a2").Hyperlinks.Add Range("a2"), "www.mypage.com", "",
"My Hyperlink"



All times are GMT +1. The time now is 05:13 PM.

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