What happened to my If
condition?
If Not IsEmpty(Wrkgps_L3) And Not IsEmpty(Wrkgps_L4) Then Wrkgps_L3L4 = Wrkgps_L3 & "," & Wrkgps_L4 End If
The Not
condition does not work. The code inside the If
statement runs even if both Wrkgps_L3
and Wrkgps_L4
are empty lines.
Update:
Wrkgps_L3
and Wrkgps_L4
are variables that contain the results returned by the function. I noticed that IsEmpty(Wrkgps_L3) = False
, although Wrkgps_L3 = ""
. I had to rewrite my code on
If (Wrkgps_L3 <> "") And (Wrkgps_L4 <> "") Then
Anyway, I'm still intrigued to know why IsEmpty
doesn't work with variables with ""
?
source share