Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default PrintPreview slows Code Execution

Hi,

I have a workbook which contains some fairly complex subs but they run fast
enough for normal needs. However, after running a small sub that just sets
the PrintArea and does a PrintPreview , code execution becomes exceeedingly
slow.

Any ideas ?

Thanks,
Don


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default PrintPreview slows Code Execution

Don,

afaik: to speed up your macro

EITHER use:
worksheets(x) .DisplayAutomaticPageBreaks = False
it's a hidden property of the worksheet object
(only shows up if hidden properties are displayed in the object browser)

you dont need to repeat that..

OR use:
worksheets(x) .DisplayPageBreaks=false
you DO need to repeat that line after each print or printpreview





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Don Lloyd wrote :

Hi,

I have a workbook which contains some fairly complex subs but they
run fast enough for normal needs. However, after running a small sub
that just sets the PrintArea and does a PrintPreview , code execution
becomes exceeedingly slow.

Any ideas ?

Thanks,
Don

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default PrintPreview slows Code Execution

"Don Lloyd" wrote in message
...
I have a workbook which contains some fairly complex subs but they run
fast enough for normal needs. However, after running a small sub that just
sets the PrintArea and does a PrintPreview , code execution becomes
exceeedingly slow.


Hi Don,

Try setting Worksheets("MySheet").DisplayPageBreaks = False for all
worksheets affected. This stops Excel from recalculating the page breaks
each time you do something that changes them and can improve performance in
some cases.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default PrintPreview slows Code Execution

Rob and KeepItCool,

Thanks very much.

Oh and Rob, personal thanks for the Code Cleaner - been using it for years !

regards,
Don

"Rob Bovey" wrote in message
...
"Don Lloyd" wrote in message
...
I have a workbook which contains some fairly complex subs but they run
fast enough for normal needs. However, after running a small sub that
just sets the PrintArea and does a PrintPreview , code execution becomes
exceeedingly slow.


Hi Don,

Try setting Worksheets("MySheet").DisplayPageBreaks = False for all
worksheets affected. This stops Excel from recalculating the page breaks
each time you do something that changes them and can improve performance
in some cases.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm




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 del Excel Discussion (Misc queries) 0 September 3rd 05 12:22 PM
Code slows on subsequent run Paul Mac. Excel Programming 3 November 4th 03 02:30 AM
VBA code slows to a snails crawl when screen saver activated Stephen Bain Excel Programming 2 October 30th 03 06:06 PM
VBA: Pausing Code Execution Michael Loganov Excel Programming 2 September 14th 03 10:53 AM
Pausing code execution Rohit Thomas Excel Programming 1 July 9th 03 10:58 PM


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

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

About Us

"It's about Microsoft Excel"