simple print loop crashes

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

I can't figure out why the following code stops executing after each
loop. When I step through the code it works fine. When I run it it
stops execution is interupted after each loop; if I "continue" it
picks up and works fine. Is there something that needs to follow the
PrintPreview (or PrintOut) statement to keep it from interupting?

Sub test2()

For i = 1 To 3

Worksheets(i).PrintPreview

Next i

End Sub

Thanks

Ken
 
printOUT will not stop. printPREVIEW will until you touch the c key or
print. That's what preview means......
 
Don
They both had the exact same behaviour; the code stopped executing
pending my clicking "continue". Previously, the PrintPreview mode
would continue once I clicked "close" on the Excel menu and PrintOut
would run continuously. Somehow it fixed itself when I restrated
Excel. Thanks for taking the time to consider this post and all your
other inputs.
Ken
 
Glad to help. Back when I was racing Formula Fords we had a saying,
"Wiggling works wonders". Guess it works with Excel too.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
Don
They both had the exact same behaviour; the code stopped executing
pending my clicking "continue". Previously, the PrintPreview mode
would continue once I clicked "close" on the Excel menu and PrintOut
would run continuously. Somehow it fixed itself when I restrated
Excel. Thanks for taking the time to consider this post and all your
other inputs.
Ken
 
Back
Top