I am trying to figure out why for two variant variables that are identical, vba says it's not.
Excel screenshot - no particular formatting
Public netw, netw_c As Variant
netw = Range("C2").Value
netw_c = Range("C1").Value * Range("B2").Value
If netw <> netw_c Then
StrUoM = StrUoM + "Error on net weight, net weight of CS is different to the net weight ZCU times their number in it." & Chr(10)
End If
Why this if loop returns me a true statement ? I noticed also, by looking a lot into this issue that if I declared my two variables netw, netw_c as Single. So, the problem is not about making it functionnal, it works with this declaration but, I don't understand why.
Here are how are defined the variable in VBA: local variable on VBA
Thank you !