+ Reply to Thread
Results 1 to 5 of 5

Screen update issues during code execution

  1. #1
    Forum Contributor Rhudi's Avatar
    Join Date
    03-08-2013
    Location
    South Carolina, US
    MS-Off Ver
    Professional Plus 2016 aka Office 365
    Posts
    199

    Screen update issues during code execution

    I'm using Office 365 (Office 2013?). In Excel, during macro execution, I will use Application.ScreenUpdating = True/False where appropriate to speed up macro execution where applicable.

    I realize the it is preferred to never ".Select" anything.

    However, I like to use (Range/Row).Select to highlight a row as a "progress indicator" to help show where the macro is working.

    With an earlier version of Excel, this was ok. Now, I have discovered a glitch caused by "?Animation". My macro seems to run too fast to let the screen catch up.

    I will:
    Please Login or Register  to view this content.
    Very often, I will get blank gray areas where the range was selected, but the cell data won't show up before the screen update is turned off.
    In some cases, I can "fix" this by adding a timed wait. But, why would I want to deliberately slow down my code?

    Every time my code detects something that I want to show the affect cell next to my msgbox, the updating on / msgbox / updating off seems to work just fine.

    I've noticed that the animated selection box can get stuck on screen when I have a 'selection change' event if I'm not careful.

    Is there some kind of display sync wait?

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Screen update issues during code execution

    how about turning the screen on at certain points? Maybe every 10th row?

    Or how About using the Status Bar to display the row number.

    Please Login or Register  to view this content.


    This works:-

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 12-29-2015 at 08:24 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor Rhudi's Avatar
    Join Date
    03-08-2013
    Location
    South Carolina, US
    MS-Off Ver
    Professional Plus 2016 aka Office 365
    Posts
    199

    Re: Screen update issues during code execution

    I use Application.StatusBar to indicate the steps that I'm working within a particular row.

    I'd like to be able to select a row (or range of the row) and have the highlight bar be solidly on that row, whilst the actual processing is happening (and the status bar is showing the steps in the pass for that row).

    I'm contemplating creating a subroutine for the "row select".

    Something like:
    Please Login or Register  to view this content.
    Last edited by Rhudi; 12-30-2015 at 09:40 AM.

  4. #4
    Forum Contributor Rhudi's Avatar
    Join Date
    03-08-2013
    Location
    South Carolina, US
    MS-Off Ver
    Professional Plus 2016 aka Office 365
    Posts
    199

    Re: Screen update issues during code execution

    I realised another minor glitch. The previous code will hang if excel looses focus and the Excel icon on my taskbar lights up.

    If I put a 'DoEvents' at the end of the sub, it works again.

    I changed the above to look like this:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor Rhudi's Avatar
    Join Date
    03-08-2013
    Location
    South Carolina, US
    MS-Off Ver
    Professional Plus 2016 aka Office 365
    Posts
    199

    Re: Screen update issues during code execution

    I also noticed that if there is a Form Show, it freezes no matter what (if Excel doesn't have focus).

+ 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. Macro execution based on OPC item update value
    By Markdata in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-08-2014, 03:36 PM
  2. [SOLVED] Code Execution Has Been Interrupted
    By JOHN H. DAVIS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-17-2014, 09:44 AM
  3. vba code execution has been interrupted
    By gageman100 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2013, 11:50 PM
  4. Screen flashes during VBA execution - does it happen in Office 2013?
    By tpbeta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2013, 05:23 PM
  5. VLookUp execution on text box automatic update
    By farzyness in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2011, 10:51 AM
  6. Code execution has been interrupted
    By Stuart C in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2006, 05:10 AM
  7. [SOLVED] code execution has been interrupted
    By del in forum Excel General
    Replies: 0
    Last Post: 09-03-2005, 08: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