Changing URL in macro

jsuh3

New Member
Joined
Mar 27, 2011
Messages
3
Let's say I want the url to change each iteration.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.google.com", Destination:=Range("$A$1"))

What can I put after the "...google.com" so that the URL is different the next time it runs? I have the loop set up, but I don't know how to join the first part of the url (static) and the second (dynamic).

Thanks in advance.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What do you mean, "different the next time it runs"? Different in what way? What you are searching for, or the destination address seeing as you said "after the ...google.com". Examples of what you are talking about would be useful.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

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