September 24, 2020
Hi Myanda Treacy,
Trust you are doing well !
My name is Punith & I am from Chennai, India. I am a new user to Excel VBA
My reason to use Excel VBA is that, I wanted to open multiple web page based on the date present in a cell range of a sheet.
In the attachment (Cell _Range.png), I have list of URL's in cell range D11 to D17. I would like to open these URL's in a default browser using Excel VBA.
I have attached a sample VBA code which works for Static URL Address. Please let me know the work around if the URL are referenced in cell.
Regards,
[Image Can Not Be Found]
November 3, 2015
Hi Punith,
Try this:
Sub OpenMultipleURLs()
Dim vURL
Dim ie As InternetExplorer
Dim iCount As IntegerSet ie = CreateObject("InternetExplorer.application")
ie.Visible = TrueRange("D11").Select
iCount = 1
While ActiveCell.Value <> ""
vURL = ActiveCell.Value
If iCount = 1 Then
ie.Navigate vURL
Else
ie.Navigate vURL, CLng(2048)
End IfiCount = iCount + 1
ActiveCell.Offset(1, 0).Select
WendSet ie = Nothing
End Sub
Regards
Graham
September 24, 2020
Hello Graham Stent,
Thank you for your reply.
When I first ran the above given code, I was facing a compilation error. I later understood, I need to check "Microsoft Internet Controls" in Tools -> References. With this change the code runs perfectly. Thank you very much for the time and effort Graham.
Regards,
Punith
1 Guest(s)