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.

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
The error is Runtime error 5, invalid procedure call or argument. Why is this happening?

When i do this.

Code:
MsgBox CDbl(-3 ^ -0.000001)
I get the correct result??!?!?! Anyone got any ideas?

Later