VBA icon

Len vs Empty, which is faster

In Is That String Really Empty? I mentioned that Empty returns the same response as Len when checking variable- and fixed-length strings. Let's test which one is faster.

Continue Reading: Len vs Empty, which is faster »

VBA icon

Is That String Really Empty?

ball of string

While testing out some operations on a Variant, I ran across an interesting problem. One of the variables I used was a fixed-length string.

Turns out, this type of variable fails the Len test: it returns the predetermined length of the variable even if you don't set it to any value! I recognize, however, that this may be only a minor problem. Who uses fixed-length string variables that often anyway?

Continue Reading: Is That String Really Empty? »

Site last updated: February 22, 2012