Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Failing Statusbar (VBA Excel)

    I've seen this several times in code I write: when I have counters/text that update the statusbar frequently sometimes the statusbar refresh just stops while the problem continues. Guess that has to do with intensive calculations and/or other things going on on my PC. In general, I wouldn't care but the problem is that once the update has stopped, it never picks up again (unles I ctrl-Break en then continue).

    I'm sure this is 'known', but (other than doing an appkication.screenupdating=true, which is not a real solution), what can I do about this???

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Failing Statusbar (VBA Excel)

    Try inserting a line

    DoEvents

    in the loop.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Failing Statusbar (VBA Excel)

    Of course... I think I actually knew that... my brain wasn't worklng... sorry

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Failing Statusbar (VBA Excel)

    Note that using the status bar slows down your code considerably. It makes sense to include a counter and do it only -say- 20 times in your entire loop (assuming your loop runs more than 20 times of course).
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •