Results 1 to 5 of 5

Thread: VBA run-time error '91': Sometimes, Sometimes Not

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    863
    Location
    Perhaps using Application.Wait (or Do Events) may be better than looping? I don't think the computer is ever too fast... it's just doing stuff in a different priority than you want it to. Real life example below for which I have no idea why the Wait is necessary. HTH. Dave
     
    UserForm13.ListBox1.ListIndex = -1
    Application.Wait (Now + TimeValue("0:00:01"))
    UserForm13.ListBox1.Clear
    Last edited by Aussiebear; 12-31-2024 at 04:42 PM.

Posting Permissions

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