Tutorial by Examples

Const baseString As String = "Hello World" Dim charLength As Long charLength = Len(baseString) 'charlength = 11
Const baseString As String = "Hello World" Dim byteLength As Long byteLength = LenB(baseString) 'byteLength = 22
When checking if a string is zero-length, it is better practice, and more efficient, to inspect the length of the string rather than comparing the string to an empty string. Const myString As String = vbNullString 'Prefer this method when checking if myString is a zero-length string If Len(mySt...

Page 1 of 1