+ Reply to Thread
Results 1 to 3 of 3

Ideas / advice using DoEvents or similar functions to streamline code & avoid greyscreen

  1. #1
    Registered User
    Join Date
    07-16-2015
    Location
    Brighton, England
    MS-Off Ver
    2010
    Posts
    71

    Ideas / advice using DoEvents or similar functions to streamline code & avoid greyscreen

    Hi thanks for looking!

    In some cases of my routines, the excel window turns grey/ unresponsive. Although it is not crashing (..most of the time), I am aware the processor power is being sent to interpret scripts, rather than to the Excel window.

    I'm starting to look at streamlining code & would like to avoid this grey screen - especially if there will be others users that are unaware of this.

    I currently only use the
    Please Login or Register  to view this content.
    I am looking into the DoEvents but have a bit of difficulty understanding the effects via the help file.

    Would using DoEvents during a loop filling up an array, impact the following code IE - it will continue the rest of the code whilst filling up the array?

    Any help on DoEvents / other suggestions for this issue will be greatly appreciated

    Thanks!

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Ideas / advice using DoEvents or similar functions to streamline code & avoid greyscre

    DoEvents will make your code slower. Look at increasing the efficiency of your code rather than dealing with the symptoms of it being slow.

    If you can post your code, we can offer suggestions as to how to make it quicker

  3. #3
    Registered User
    Join Date
    07-16-2015
    Location
    Brighton, England
    MS-Off Ver
    2010
    Posts
    71

    Re: Ideas / advice using DoEvents or similar functions to streamline code & avoid greyscre

    Hi thanks,

    I've narrowed down the area that seems to be giving the worst grey screen issues. There's some looping that's pretty hard to follow - I've noted the part in bold below, which is the only area that really affects it.

    -There is an input box entry for data that is missing,
    - whist checking its empty, it also holds and a value from an adjacent cell.
    - If this adjacent value is matched on the next empty cell, it automatically fills it with the data already put in by the user from the input box (held in dim HLD & POt)

    This could fill up to 500 cells at a time which I think is creating the giving grey screen

    Any ideas with this I would be very thankful!

    (The j and jt dimensions is just a count issued prior to running this loop - all it does it give the use an indication of how many entires need to be filled and the -1 is counting down)

    Thankyou!


    Please Login or Register  to view this content.

+ 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. VBA code advice/Excel advice for summing groups of numbers
    By paulblower in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2014, 05:47 AM
  2. Looking for ideas / advice regarding print settings
    By mike703 in forum Excel General
    Replies: 0
    Last Post: 04-08-2013, 01:19 PM
  3. Streamline VBA Code , merge Worksheets in a Workbook
    By smarerah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2011, 06:45 AM
  4. Help to streamline my code.
    By gpwaters in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-21-2011, 02:55 PM
  5. Streamline Code The Solution??
    By smillshome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-07-2009, 09:03 AM
  6. Database was corrupted - advice on how to avoid this in the future?
    By shadestreet in forum Access Tables & Databases
    Replies: 5
    Last Post: 05-14-2009, 02:49 PM
  7. How can I streamline this repetitious piece of code?
    By Father Guido in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2006, 03:15 PM

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