B
bob
i am trying to refresh a query every 10 min.
using the .RefreshPeriod = 10 in the query loop doesn't redue all of the
macro formatting that follows query so i was wondering if refresh could be
used in a sub to run the main macro. something like this
sub refresh()
Application.Run "'TEST.XLS'!GetData"
..RefreshPeriod = 10
End Sub
or how would i automate running the macro.
this is the query loop in main macro
Workbooks.Add
With ActiveSheet.QueryTables.Add(Connection:=connectURL,
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.PostText = "TICKER=" & Symbol
.refresh BackgroundQuery:=False 'DL text data
.RefreshPeriod = False 'no refresh
.SaveData = True
End With
thanks
using the .RefreshPeriod = 10 in the query loop doesn't redue all of the
macro formatting that follows query so i was wondering if refresh could be
used in a sub to run the main macro. something like this
sub refresh()
Application.Run "'TEST.XLS'!GetData"
..RefreshPeriod = 10
End Sub
or how would i automate running the macro.
this is the query loop in main macro
Workbooks.Add
With ActiveSheet.QueryTables.Add(Connection:=connectURL,
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.PostText = "TICKER=" & Symbol
.refresh BackgroundQuery:=False 'DL text data
.RefreshPeriod = False 'no refresh
.SaveData = True
End With
thanks