+ Reply to Thread
Results 1 to 6 of 6

Application.ScreenUpdating = False. A problem...

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Application.ScreenUpdating = False. A problem...

    Hi,

    We recently updated to Windows 7 at work and as a result one of my macros began to run really slowly, presumably because of the large grid size? Anyhow, this was the macro in question...

    Please Login or Register  to view this content.

    I solved the issue by adding:

    Please Login or Register  to view this content.
    at the start of the macro.

    However what this does is to stop the Sheet2.Activate from working. This is important as the user needs to check the register to make sure the details are correct before printing. Can anyone think of a way round this?
    Last edited by Barking_Mad; 11-14-2011 at 08:22 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Application.ScreenUpdating = False. A problem...

    It won't stop a sheet from being activated, but it will stop the screen refreshing until the code has finished. You must of course add Application.ScreenUpdating= True when the code has finished.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Application.ScreenUpdating = False. A problem...

    Quote Originally Posted by royUK View Post
    It won't stop a sheet from being activated, but it will stop the screen refreshing until the code has finished. You must of course add Application.ScreenUpdating= True when the code has finished.
    hi, sorry im not quite following you....I currently have:

    Please Login or Register  to view this content.
    However instead of the macro switching to Sheet2.Activate and displaying the print dialogue box, it stays on the same sheet the macro is run on and displays the print box. This means that the user cant chack what is about to be printed.

    Am I making sense, or just misunderstanding you?!

  4. #4
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Application.ScreenUpdating = False. A problem...

    I think you need to add the line Application.ScreenUpdating = True before the final part of your code. This re enables the scree to be updated so the suer can see the output

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Application.ScreenUpdating = False. A problem...

    Hi,

    I put it after the Sheet2.Activate and it worked fine - which was odd as I swear id tried that at least half a dozen times before! Maybe my lack of sleep is catching up with me!

    Ta

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,007

    Re: Application.ScreenUpdating = False. A problem...

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Everyone who confuses correlation and causation ends up dead.

+ 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