Thread
:
Need a pause in my macro before printing
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Need a pause in my macro before printing
try this or have your query .Refresh BackgroundQuery:=False
application.enableevents=false
ActiveWorkbook.RefreshAll
application.enableevents=true
Sheets("JOB COST SUMMARY").PrintOut
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Chas" wrote in message
...
Sorry I forgot to add the code currently being used
ActiveWorkbook.RefreshAll
Sheets("JOB COST SUMMARY").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Again, the problem is that it prints before the refresh in complete, I
want
it to print when the refresh is done.
Thanks Again
"Chas" wrote:
I have a macro that basically refreshes several queries & performs some
other
basic task. I need to add code that will then print a final report
(which is
just printing one of the tabs). The problem I'm having is that when I
add a
pause, it seems to pause the refreshing process then it ends up printing
before all of the refreshes are complete. Any suggestions, I'm very new
to
VBA so I'm sure this is an easy fix that I'm overlooking.
Thanks
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett