You are facing an issue with floating-point arithmetic precision.
Please have a look at
What Every Computer Scientist Should Know About Floating-Point Arithmetic[
^]
[Edit] By the way, there exists an excellent article from John Simmons / outlaw programmer here on CP; it presents a way to circumvent this problem in equality comparisons between floating-point values. There:
Reliable Floating Point Equality Comparison[
^]
As the code in this article is for C++, here is the extension method I'm using in C# for all equality comparisons with floating-point valuetypes:
public static bool AlmostEquals(this double value, double other, double epsilon = 1e-15)
{
return (((other - epsilon) < value) && (value < (other + epsilon)));
}
It is based on the comment from B. Clay Shannon in the same article.
Usage of this snippet applied to your case could be:
Sub Test()
Dim V As Double
V = 0.43 + 0.000001 - 0.430001
If Not V.AlmostEquals(0) Then
MsgBox "Why we goes hear?"
End If
End Sub