ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hyperlinks (https://www.excelbanter.com/excel-programming/321225-hyperlinks.html)

[email protected]

hyperlinks
 
hi all
what is the code for hyperlinking to a webpage from vba, i know you can
insert a hyperlink ontp a worksheet but can you do it via code
regards
johny5


Bob Phillips[_6_]

hyperlinks
 
Here is an example

With Worksheets("Sheet3")
.Hyperlinks.Add Anchor:=.Range("A1"), _
TextToDisplay:="xlDynamic", _
Address:="http://www.xldynamic.com/"
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
oups.com...
hi all
what is the code for hyperlinking to a webpage from vba, i know you can
insert a hyperlink ontp a worksheet but can you do it via code
regards
johny5




Tom Ogilvy

hyperlinks
 
Bob has shown you how to add a hyperlink. If you want to execute a
hyperlink without having it physically exist, look at the followhyperlink
method of the workbook object (not the followhyperlink event).

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
hi all
what is the code for hyperlinking to a webpage from vba, i know you can
insert a hyperlink ontp a worksheet but can you do it via code
regards
johny5





All times are GMT +1. The time now is 10:08 AM.

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