+ Reply to Thread
Results 1 to 7 of 7

Application.screenupdating True towards False isnt working

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2013
    Posts
    72

    Application.screenupdating True towards False isnt working

    Hi,

    I am not a vba wizard but usually i know my way a bit. This macro is refreshing sheets which are in the sheetslist, but whilst refreshing i want inform the users what sheet is actually updating..
    It seems that Application Screenupdating True towards False isnt working?

    Can somebody explain why VBA is looping through the sheets, whilst I changed it to Application.screenupdating = false


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Application.screenupdating True towards False isnt working

    Hi,

    Why would you expect to be on sheet1 when you haven't selected/activated sheet1. All you've done is add some information to it. The active sheet is the last one you selected with the objSheet.Select instruction.

    But if you want to pass information back to the user why not use the

    Please Login or Register  to view this content.
    instruction?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Application.screenupdating True towards False isnt working

    Hi,

    You have the line that sets screenupdating to True inside your loop. That will have the effect of updating the screen for each sheet. You should only set it to True at the end of your code.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Application.screenupdating True towards False isnt working

    Because you are selecting each sheet in turn, but not selecting / activating "Sheet1". So when you switch screenupdating back to true, it displays the currently selected worksheet.

    You could modify your code as follows:
    Please Login or Register  to view this content.

    Or you could simply use the statusbar to inform your users of progress.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  5. #5
    Registered User
    Join Date
    05-07-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2013
    Posts
    72

    Re: Application.screenupdating True towards False isnt working

    Thanks for the reply!

    Olly, you made me see the light Setting back to "true", this automatically displays the current "selected" sheet. Its more simple than my thoughts were going tbh!
    The With - end With, that does the trick. Thanks for that!

    The Application.wait (extra second) was due to its speed. I have an I7 with EVO SSD.. it just goes too quick, it looks like nothing happened!

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Application.screenupdating True towards False isnt working

    Quote Originally Posted by Fean View Post
    The Application.wait (extra second) was due to its speed. I have an I7 with EVO SSD.. it just goes too quick, it looks like nothing happened!
    Which begs the question - why bother updating progress, if it processes that fast?!

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Application.screenupdating True towards False isnt working

    Quote Originally Posted by Olly View Post
    Which begs the question - why bother updating progress, if it processes that fast?!
    PedantMode:=True

    It 'Raises' another question, not 'Begs'. 'Begging the question - petitio principii' is a logical fallacy and something quite different.

    PedantMode:=False


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Application.Screenupdating = False - not working
    By demarc in forum Excel General
    Replies: 3
    Last Post: 05-02-2015, 11:02 AM
  2. Application.Screenupdating = false not working
    By tanvi_kalra in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-30-2014, 09:55 AM
  3. Application.ScreenUpdating = True help
    By v2jtb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2012, 11:36 AM
  4. Application.ScreenUpdating = False. A problem...
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-14-2011, 08:07 AM
  5. Application.screenupdating = False is not working
    By gnome_core in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2009, 03:32 PM
  6. How to set Application.ScreenUpdating = False for Gen use
    By David_Williams_PG () in forum Excel General
    Replies: 1
    Last Post: 08-15-2006, 07:10 AM
  7. Using the Application.ScreenUpdating = False?
    By Susan Hayes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2005, 12:06 AM

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