Two Web querys with dynamic cell reference

Kele

Board Regular
Joined
May 21, 2008
Messages
64
Hi,

I have been looking through this site and the web and I have created a dynamic web query that uses a cell as a reference but I would not like to add another web query that will update at the same time and use the same cell, but i have tried a couple of things and I cant get it to work any help would be great

Below is what i have and it all going on the sheet call sun with (F1) with my date range that changes

Sub CollectData()

Dim Sh As Worksheet, xNazwa As Object
Dim xConect As Object


Application.DisplayAlerts = False


wtURL1 = "URL;https://welcome.coremetrics.com/analyticswebapp/api/1.0/topline-data/topline.ftl?clientId=xxx&username=xxxxx&format=XML&userAuthKey=xxxxxxxxxx&language=en_UK&viewID=8029536&period_a="

wtURLprof2 = Sheets("Sun").Range("F1").Value

wtURL = wtURL1 & wtURLprof2


With Sheets("Sun").QueryTables.Add(Connection:= _
wtURL, _

Destination:=Sheets("Sun").Range("G3"))

.BackgroundQuery = True
.TablesOnlyFromHTML = True
.RefreshStyle = xlOverwriteCells
.Refresh BackgroundQuery:=False
.SaveData = True
.SavePassword = True
.AdjustColumnWidth = True
End With


End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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