A
Aaron
Hello all,
I have 5 warnings only but I want to know how to "optimize" my code so that
it is "clean."
The warning is this with all 5 the same
Warning 1 Variable 'strxxx' is used before it has been assigned a value. A
null reference exception could result at runtime.
Here is the code
Dim strxxxAs String
.....
.....
If ckxxx.Checked = True Then
strxxx = ckxxx.Text
End If
....
.....
objMail.Body = ....
strxxx& vbCrLf + _
The warnings are in the objMail.Body part of the code.
TIA
Aaron
I have 5 warnings only but I want to know how to "optimize" my code so that
it is "clean."
The warning is this with all 5 the same
Warning 1 Variable 'strxxx' is used before it has been assigned a value. A
null reference exception could result at runtime.
Here is the code
Dim strxxxAs String
.....
.....
If ckxxx.Checked = True Then
strxxx = ckxxx.Text
End If
....
.....
objMail.Body = ....
strxxx& vbCrLf + _
The warnings are in the objMail.Body part of the code.
TIA
Aaron