Hi. I have come across the following error when trying to raise a number to the power of another number in VB. Here is my code.
The error is Runtime error 5, invalid procedure call or argument. Why is this happening?Code:Dim a As Double Dim b As Double Dim c As Double a = -3 b = -0.000001 'I get an error on the statement below c = a ^ b
When i do this.
I get the correct result??!?!?! Anyone got any ideas?Code:MsgBox CDbl(-3 ^ -0.000001)
Later




Reply With Quote