![]() |
ActiveWorkbook.RefreshAll
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 |
ActiveWorkbook.RefreshAll
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 |
ActiveWorkbook.RefreshAll
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 |
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 |
All times are GMT +1. The time now is 04:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com