+ Reply to Thread
Results 1 to 3 of 3

Use of Screenupdating on subroutines

  1. #1
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Use of Screenupdating on subroutines

    I have written a number of macros, and I typically use Application.Screenupdating = False at the start, and set it True at the end of each macro. However, I now have some big macros which call others as subroutines. This results in the screen updating for each pass thru a called macro, as the Application.Screenupdating = True statement is executed.

    Is there a means to repress this at the top level, or is there a better approach to take in writing code which will stop screen update for a macro, but not restart it each time the macro is called as a subroutine?

    Any help appreciated.

    GJCase
    Last edited by gjcase; 09-21-2009 at 12:53 PM. Reason: Mark solved

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Use of Screenupdating on subroutines

    Instead of turning it off and then on, each sub should cache the current state and the restore it on exit:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: Use of Screenupdating on subroutines

    Thanks!


    GJCase

+ 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