Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21281

Inconsistent? Runtime Error 5

$
0
0
Hi,

I have a strange problem.

As an example, (x) = the results of a long equation and ends up = -5.22150298374801

In a given situation (but not always), if I try to calculate x ^ (1/3), I get
Code:

        Runtime Error 5:  Invalid Procedure Call or Argument
But the value of (x) is perfectly legitimate. If I try it in the Immediate window, same error.

BUT, if I then take the VALUE of (x) and try again in the Immediate window, it finishes successfully:
-5.22150298374801 ^ (1/3) = -1.73486296827343

(x) is a Double.

What the heck is going on?! :(

Viewing all articles
Browse latest Browse all 21281

Trending Articles