+ Reply to Thread
Results 1 to 6 of 6

Screen updating and enable events code

  1. #1
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    365
    Posts
    151

    Screen updating and enable events code

    This was code from https://www.rondebruin.nl/win/s1/outlook/amail4.htm

    If the code:
    Please Login or Register  to view this content.
    if it will be removed, what will happen? What is the use of this codes in mailing?

  2. #2
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Screen updating and enable events code

    As this is setting both to True I'd guess it was near the end of the code? It's returning settings to their normal state after they were changed to False earlier in the code.

    Removing it purely stop the two settings being set to True until you close Excel and open it again, or set them to true elsewhere.

    Nothing like sheet change events will fire and any code that makes changes that would be visible on screen will not be seen.

    Beth.

  3. #3
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    365
    Posts
    151

    Re: Screen updating and enable events code

    Yes, it is at the end of the code. In the start:
    Please Login or Register  to view this content.
    Why it is set to false in the start of the code?

  4. #4
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Screen updating and enable events code

    Quote Originally Posted by dummy777 View Post
    Why it is set to false in the start of the code?
    Setting ScreenUpdating to False stops the screen showing what's going on as the code runs. Sometimes this is because you don't want to see people what's happening but mostly it's used because code runs quicker when Excel isn't constantly redrawing the screen at every little change.

    Setting EnableEvents to False stops events from firing as your code runs. If you have a change event, for example, that fires when you change the value in A1 but the code will change A1 and you do not want that event to fire, then setting EnableEvents to False will prevent it happening. Not easy to explain, but I'm sure there is plenty of info out there that will give you more of an idea on why you would ever use is.

    Beth.

  5. #5
    Forum Contributor
    Join Date
    08-18-2018
    Location
    Canada
    MS-Off Ver
    365
    Posts
    151

    Re: Screen updating and enable events code

    Oh I see, thank you for explaining.

  6. #6
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Screen updating and enable events code

    No problem. Happy I could help.

    Beth.

+ 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. Help Needed with Screen Updating Code
    By RHONDAK72 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2018, 04:20 AM
  2. Excel 2016 screen flashing between two workbooks despite screen updating turned off
    By Cumberland in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2016, 03:07 PM
  3. Enable events while screenupdating=false
    By jayherring86 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2016, 07:09 PM
  4. Is it possible Enable one/few events, and disable rest of the events by VBA Excel?
    By hoalahpi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2016, 02:24 AM
  5. [SOLVED] Enable events on the worksheet's code page
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2016, 04:50 PM
  6. Screen Updating = False not working - need help to remove .select from code?
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2014, 08:58 PM
  7. Replies: 4
    Last Post: 01-23-2014, 07:05 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