ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing problem (https://www.excelbanter.com/excel-programming/320943-printing-problem.html)

GF

Printing problem
 
I am trying to print a series of reports that are retrieving information from
a data source using VBA. If I place a msgbox in between the print requests
the printout
succeeds. If I do not do this it does not print. It is as if the printer
cannot print if the retrieval is not fast enough. Is there a way to put a
delay in possibly.
..



NickHK

Printing problem
 
gf,
Not sure if this is it, but are the querytables have .BackgroundRefresh=True
?

NickHK

"gf" wrote in message
...
I am trying to print a series of reports that are retrieving information

from
a data source using VBA. If I place a msgbox in between the print requests
the printout
succeeds. If I do not do this it does not print. It is as if the printer
cannot print if the retrieval is not fast enough. Is there a way to put a
delay in possibly.
.





GF

Printing problem
 
Nick

Firstly, thanks for the reply.

Within the same routine we have been able to print fine, but when a more
detailed query is given then it does not print. Saying that if we put a
message box on to stop the routine then it prints. I am a bit lost as to why.

Thanks

"NickHK" wrote:

gf,
Not sure if this is it, but are the querytables have .BackgroundRefresh=True
?

NickHK

"gf" wrote in message
...
I am trying to print a series of reports that are retrieving information

from
a data source using VBA. If I place a msgbox in between the print requests
the printout
succeeds. If I do not do this it does not print. It is as if the printer
cannot print if the retrieval is not fast enough. Is there a way to put a
delay in possibly.
.






NickHK

Printing problem
 
gf,
That's why I asked if you are using QueryTables. (Sorry, should be
..BackgroundQuey not .BackgroundRefresh)
There is also an "AfterRefresh" event and .Refreshing property.

It may be that you are not waiting until the refresh has finished before you
try printing it.

Some code of what you are currently doing would help.

NickHK

"gf" wrote in message
...
Nick

Firstly, thanks for the reply.

Within the same routine we have been able to print fine, but when a more
detailed query is given then it does not print. Saying that if we put a
message box on to stop the routine then it prints. I am a bit lost as to

why.

Thanks

"NickHK" wrote:

gf,
Not sure if this is it, but are the querytables have

..BackgroundRefresh=True
?

NickHK

"gf" wrote in message
...
I am trying to print a series of reports that are retrieving

information
from
a data source using VBA. If I place a msgbox in between the print

requests
the printout
succeeds. If I do not do this it does not print. It is as if the

printer
cannot print if the retrieval is not fast enough. Is there a way to

put a
delay in possibly.
.









All times are GMT +1. The time now is 03:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com