IsDate function returns unexpected results

I got tripped up by this little “feature” recently and wanted to raise awareness of some of the issues surrounding the IsDate function in VB and VBA. The Simple Case As you’d expect, IsDate returns True when passed a Date data type and False for all other data types except Strings. For Strings, IsDate returns … Read more

Variable iterating on itself – different behavior with different types

Please see edits below! For Each edits also added below under Edit2 More edits about ForEach and Collections at Edit3 One last edit about ForEach and Collections at Edit4 A final note about iteration behavior at Edit5 Part of the subtlety of this odd behavior in the semantics of variant evaluation when used as a … Read more

What does the Call keyword do in VB6?

From the MSDN: You are not required to use the Call keyword when calling a procedure. However, if you use the Call keyword to call a procedure that requires arguments, argumentlist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentlist. If you use either Call … Read more

VB6 equivalent of string.IsNullOrEmpty

VB6 was designed to be easy Use If str = “” Then ‘ uninitialised, null or empty “” Strings are automatically initialized to [edit] a null string. The null string is vbNullString. But don’t worry about null strings. A VB6 null string is indistinguishable from an empty string “” for (almost) any string manipulation.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)