LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Code execution interrupted on PrintPreview close

The macro works fine up to the print preview. When I Close from the toolbar
I get the message "Code execution has been interrupted".
What can I add to the macro to prevent the interruption?

Here's the code from the macro

Sub PPreview()

ActiveWindow.FreezePanes = False
ActiveSheet.PageSetup.PrintArea = "PRT_G1"
ActiveWindow.SelectedSheets.PrintPreview
End Sub
--
AusTexRich
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code execution has been interrupted LAF Excel Discussion (Misc queries) 2 February 21st 08 03:03 PM
Code execution has been interrupted Who I Am Excel Programming 5 September 28th 05 03:32 PM
code execution has been interrupted del Excel Discussion (Misc queries) 0 September 3rd 05 12:22 PM
code execution has been interrupted François Excel Discussion (Misc queries) 1 February 18th 05 11:06 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"