RosettaCodeData/Task/Empty-string/VBA/empty-string.vba
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

14 lines
314 B
Text

dim s as string
' assign an empty string to a variable:
s = ""
' test if a string is empty:
if s = "" then Debug.Print "empty!"
' or:
if Len(s) = 0 then Debug.Print "still empty!"
'test if a string is not empty:
if s <> "" then Debug.Print "not an empty string"
'or:
if Len(s) > 0 then Debug.Print "not empty."