02-08-2009, 03:50 AM
One thing I noticed instantly is:
, that's a no-no. When not declaring a specific type it automatically defines it as a variant, which is very slow. I'd probably go with Dim R as String, or Dim R as Long. Either one should work.
Also using counters in For...Next loops is slower, instead of Next I just put Next.
Also put in your forms and whatnot, that makes it so you have to dim your variables. Things could get out of hand otherwise. Generally bad practice to not use it, unless you're using a different Option.
Nest your code, it's hard to read.
Also I noticed you use, instead use . Most of the time this is better.
Also if you have variables and whatnot you're not using, delete them. They take up space.
Might be more, I'll look over it more thoroughly later.
Code:
Dim r
Also using counters in For...Next loops is slower, instead of Next I just put Next.
Also put
Code:
Option Explicit
Nest your code, it's hard to read.
Also I noticed you use
Code:
""
Code:
VbNullString
Also if you have variables and whatnot you're not using, delete them. They take up space.
Might be more, I'll look over it more thoroughly later.