+ Reply to Thread
Results 1 to 3 of 3

Screen Updating reset at end of procedure

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Screen Updating reset at end of procedure

    Hi,

    I'm just seeking clarification on the application.screenupdating property.

    On multiple websites now (e.g. http://www.cpearson.com/excel/Events.aspx) I have read that screenupdating is automatically reset to true at the end of a sub. Can anyone confirm this? I'm just a little vexed because in the excel help file it says:

    "Remember to set the ScreenUpdating property back to True when your macro ends"

    Obviously if screenupdating automatically resets then putting
    Please Login or Register  to view this content.
    at the end of a sub is pointless

    Can anybody shed some light?

    Thanks

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Screen Updating reset at end of procedure

    I have just tested this for you and indeed the Application.ScreenUpdating property is reset to True at the end of a routine, even without the explicit statement (news for me).

    I have noticed however that in case of errors within your routine it sometimes remains off, so I guess it would be good practice to have proper error handling and perhaps a forced reset.
    If you like my contribution click the star icon!

  3. #3
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Screen Updating reset at end of procedure

    Thanks. I'll keep the forced reset in my error handler but remove it from the end of my subs.

    Strange though that the aforementioned statement in the help file seems to contradict how the screenupdating propery actually works. If anybody could provide more info on why microsoft has put this in the help file I'd be very interested.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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