ActiveWorkbook.RefreshAll
Edit the query and there should be an option for that in the dialog.
An alternative is to just have your refresh command insure a foreground
query.
Activesheet.QueryTables(1).Refresh Backgroundquery:=False
RefreshAll doesn't have that argument.
--
Regards,
Tom Ogilvy
"Matt Cromer" wrote:
Tom -
That sound great, how do I set up the query (there is actually only one) to
not run in the background?
"Tom Ogilvy" wrote:
why not set up your queries so they don't query in the background -- then you
shouldn't need to worry about it.
--
Regards,
Tom Ogilvy
"Matt Cromer" wrote:
I would like to gve the RefreshAll 5 seconds to complete before performing
the next actions. Is this possible?
Thanks
ActiveWorkbook.RefreshAll
Sheets("Data").Select
Sheets("Data").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
|