option explicit
public sub vb_null_string()
dim str_quotequote as string
str_quotequote = ""
dim strUninitialized as string
if str_quotequote = vbNullString then
msgBox("str_quotequote = vbEmptyString") ' str_quotequote = vbEmptyString
else
msgBox("not str_quotequote = vbEmptyString")
end if
if str_quotequote <> vbNullString then
msgBox("str_quotequote <> vbEmptyString")
else
msgBox("not str_quotequote <> vbEmptyString") ' not str_quotequote <> vbEmptyString
end if
'-
if strUninitialized = vbNullString then
msgBox("strUninitialized = vbEmptyString") ' strUninitialized = vbEmptyString
else
msgBox("not strUninitialized = vbEmptyString")
end if
if strUninitialized <> vbNullString then
msgBox("strUninitialized <> vbEmptyString")
else
msgBox("not strUninitialized <> vbEmptyString") ' not strUninitialized <> vbEmptyString
end if
'-
' Type mismatch:
' --------------
'
' if vbEmpty = vbNullString then
' msgBox("vbEmpty = vbNullString")
' else
' msgBox("not vbEmpty = vbNullString")
' end if
end sub