+ Reply to Thread
Results 1 to 4 of 4

PrintPreview slows Code Execution

  1. #1
    Don Lloyd
    Guest

    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. #2
    keepITcool
    Guest

    Re: 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. #3
    Rob Bovey
    Guest

    Re: PrintPreview slows Code Execution

    "Don Lloyd" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #4
    Don Lloyd
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > "Don Lloyd" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1