I'm stumped. I have a simple calculation in a Macro which results in a -ve number.
Gr = ((1 - 2 / a) / (1 + x * sqr(2 / (a - 4)))) ^(1 / 3)
I did a watch on a and x, they are 191 and -21.
The error is " Run-time error '5' Invalid procedure call or argument "
Oddly, if I perform the SAME calc in the Worksheet it works FINE. It just fails in VBA?
Any other ... um ... hints?
k.
1. I already had a thought to send it back to the worksheet and then kuludging it back to the macro.
2. Also have implemented a -ve if statement check and multiplied by -1 if <0, then cube root that and return it to a -ve. Still a kludge though.
Bookmarks