VBA for Opening Multiple IE and go to specific HTTP in cell

jalifid11

Board Regular
Joined
Nov 17, 2006
Messages
168
I've got to do maintenance on several HTTP addresses.

I've got 10 HTTP addresses in cells A1:A10.

What is a good VBA that will open up 10 IE and go to each of the HTTP addresses in A1:A10?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try this:

Code:
Sub Test
Dim myRange as Range, c as Range
Dim oShell as Object

Set myRange = sheet1.Range("A1:A10")
Set oShell = CreateObject("Wscript.Shell")

For each c in myRange
       oShell.Run c
Next c

End Sub
 
Upvote 0
Thanks poolhall..

When I attempt to run the macro, I get an error...

it can't run the oShell.Run c
 
Upvote 0
it runs fine in my Excel, 2003 and 2007. What's exact error are you getting? Also, give me the example of value in A1.
 
Upvote 0
it's probably the reference error.

Sheet1 in

Code:
Set myRange = Sheet1.Range("A1:A1")

refers to a worksheet with a code name Sheet1. It does not refer to a worksheet named Sheet1.
Please change it to the correct codename, or use a worksheet name
Code:
Set myRange = Sheets("Sheet1").Range("A1:A10")
or use it like this:
Code:
Set myRange = ActiveSheet.Range("A1:A10")
 
Upvote 0

Forum statistics

Threads
1,207,442
Messages
6,078,581
Members
446,349
Latest member
Malroos7912

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top