|
-
Apr 13th, 2020, 01:52 AM
#3
Re: Ok noobies, DoEvents is slow!!! Here's are faster methods:
You don't have to call DoEvents many times in a loop.
For instance, if you have a loop of 1,000,000 iterations, do not call DoEvents 1,000,000, but call it every 1,000 iterations (or more).
Sample:
Code:
Dim c As Long
For c = 1 To 1000000
If (c Mod 1000) = 0 Then DoEvents
' code
Next c
That won't make DoEvents faster, but it will make the relative slowness unimportant.
There may be cases where you really need to call it very frequently, but in most cases not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|