ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print is paused by msgbox! (https://www.excelbanter.com/excel-programming/430564-print-paused-msgbox.html)

流浪的双鱼

Print is paused by msgbox!
 

I use vba code as following to print the worksheet. But the print will go
after the Messege Box disappears. Why? Is there any method to avoid being
paused by Msgbox?
Thanks in advance!
Sub PrintWS()
ActiveDocument.PrintOut
MsgBox "Printint is over!"
End Sub


joel

Print is paused by msgbox!
 

tyr adding a do event

ActiveDocument.PrintOut
DoEvents
MsgBox "Printint is over!"


"流浪的双鱼" wrote:

I use vba code as following to print the worksheet. But the print will go
after the Messege Box disappears. Why? Is there any method to avoid being
paused by Msgbox?
Thanks in advance!
Sub PrintWS()
ActiveDocument.PrintOut
MsgBox "Printint is over!"
End Sub


流浪的双鱼

Print is paused by msgbox!
 

I have tried it,but it is of no use.

"Joel" wrote:

tyr adding a do event

ActiveDocument.PrintOut
DoEvents
MsgBox "Printint is over!"


"流浪的双鱼" wrote:

I use vba code as following to print the worksheet. But the print will go
after the Messege Box disappears. Why? Is there any method to avoid being
paused by Msgbox?
Thanks in advance!
Sub PrintWS()
ActiveDocument.PrintOut
MsgBox "Printint is over!"
End Sub


KC

Print is paused by msgbox!
 

Excel 2003

I do not have problem, except printout is slower than msgbox appearing.
Are you printing Word application please?

Sub m()
ActiveSheet.PrintOut
MsgBox "printed"
End Sub


"流浪的双鱼" wrote in message
...
I use vba code as following to print the worksheet. But the print will go
after the Messege Box disappears. Why? Is there any method to avoid being
paused by Msgbox?
Thanks in advance!
Sub PrintWS()
ActiveDocument.PrintOut
MsgBox "Printint is over!"
End Sub


流浪的双鱼

Print is paused by msgbox!
 

Yes. I am printing Word application.

"KC" wrote:

Excel 2003

I do not have problem, except printout is slower than msgbox appearing.
Are you printing Word application please?

Sub m()
ActiveSheet.PrintOut
MsgBox "printed"
End Sub


"流浪的双鱼" wrote in message
...
I use vba code as following to print the worksheet. But the print will go
after the Messege Box disappears. Why? Is there any method to avoid being
paused by Msgbox?
Thanks in advance!
Sub PrintWS()
ActiveDocument.PrintOut
MsgBox "Printint is over!"
End Sub



All times are GMT +1. The time now is 12:26 PM.

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