G
Guest
Hi everyone,
I have a section of code where I'm trying to see if a variable
(UserCompSum), declared as a double, is equal to 100, like this:
Dim UserCompSum As Double
If UserCompSum = 100 Then
bUserCompSum = True
End If
but even when UserCompSum is equal to 100 the code doesn't seem to think so
and I get stuck with bUserCompSum = False.
I have a workaround by doing this:
If CInt(UserCompSum) = 100 Then
bUserCompSum = True
End If
but this seem a little inelegant to me.
Does anyone know how to compare Double values?
TIA
big t
I have a section of code where I'm trying to see if a variable
(UserCompSum), declared as a double, is equal to 100, like this:
Dim UserCompSum As Double
If UserCompSum = 100 Then
bUserCompSum = True
End If
but even when UserCompSum is equal to 100 the code doesn't seem to think so
and I get stuck with bUserCompSum = False.
I have a workaround by doing this:
If CInt(UserCompSum) = 100 Then
bUserCompSum = True
End If
but this seem a little inelegant to me.
Does anyone know how to compare Double values?
TIA
big t