![]() |
Access a Web Site from VBA,
Hi!
I need a macro to access a web site from vba. I do know How to use: ActiveSheet.Hyperlinks.Add _ Anchor:=Selection, Address:= _ "http://www.allexperts.com", _ TextToDisplay:="Text to Dispaly" BUT THIS IS NOT THE CASE!! So I need some thing like: Sub Eg() Application.Open "www.google.com" End Sub This way when I presh Eg, I go directly to the desired Web Site, in this example to www.gogle.com PS: Please avoid sending me Hyperlinks examples using a range, a cell and/or a selection. This has to be done from VBA, and I have to go to the desired Web Site from my macro!!! Many Thanks!!!!!!! |
Access a Web Site from VBA,
Try this
Sub LoadWebPage2() ActiveWorkbook.FollowHyperlink Address:="http://www.rondebruin.nl/Google.htm" End Sub Or Sub LoadWebPage1() Dim oleIE As Object Set oleIE = CreateObject("InternetExplorer.Application") With oleIE '.TheaterMode = True .Visible = True .Navigate "http://www.rondebruin.nl/Google.htm" End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message om... Hi! I need a macro to access a web site from vba. I do know How to use: ActiveSheet.Hyperlinks.Add _ Anchor:=Selection, Address:= _ "http://www.allexperts.com", _ TextToDisplay:="Text to Dispaly" BUT THIS IS NOT THE CASE!! So I need some thing like: Sub Eg() Application.Open "www.google.com" End Sub This way when I presh Eg, I go directly to the desired Web Site, in this example to www.gogle.com PS: Please avoid sending me Hyperlinks examples using a range, a cell and/or a selection. This has to be done from VBA, and I have to go to the desired Web Site from my macro!!! Many Thanks!!!!!!! |
All times are GMT +1. The time now is 01:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com