View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default 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