vbNullString
is a special constant that denotes a null string (0), while ""
is a literal empty string. For most purposes,
the two are equivalent, but vbNullString
is faster to assign and process, and takes less memory. vbNullString
is therefore
preferred, however some non-VB APIs or components may not properly handle null strings, and their use should be tested.
Noncompliant code example
Text = ""
Compliant solution
Text = vbNullString