Reading from the object variable is slower than reading from the local variable. So if you're going to be using the object variable frequently, store it in a local variable and access it that way.
Slower:
If Object.Value = 0 thenFaster:
Do something
elseif Object.Value > 0 then
Do something
elseif Object.Value
etc...
Dim vObject
vObject = Object.Value
if vObject = 0 then
Do something
elseif vObject > 0 then
Do something
elseif vObject <> etc...
No comments:
Post a Comment