Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Code execution interrupted on PrintPreview close

It didn't blow up for me (xl2003), but I have seen things like this cause
trouble--but I remember them happening when I'm stepping through the code--not
when I really run it. Am I mis-remembering?

And I don't think that there's anything you can do to stop that--so save your
work often.

Ps. From John Walkenbach's site:
http://j-walk.com/ss/excel/odd/odd11.htm

AusTexRich wrote:

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


--

Dave Peterson
Reply
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 12:33 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"