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
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