Thread
:
bizarre "invalid procedure call" error
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
bizarre "invalid procedure call" error
Can't tell you why but the problem was with the -
This worked
Sub Test1()
Dim a As Double, b As Double, c As Double
a = 0.1
b = 0.05
c = -a ^ b
MsgBox c
End Sub
--
Don Guillett
SalesAid Software
"PatFinegan " wrote in message
...
Sub Test1 below generates an "invalid procedure call or argument" error
(#5) in Excel 97 and Excel 2003 on all of my PCs. Sub Test2 does not.
Can anyone replicate this? If so, can anyone explain the problem, or
provide a workaround other than writing the variables to cells and
performing the calculations there? Thanks in advance.
Sub Test1()
Dim a As Double, b As Double, c As Double
a = -0.1
b = 0.05
c = a ^ b
End Sub
Sub Test2()
Dim c as Double
c = -0.1 ^ 0.05
End Sub
---
Message posted from
http://www.ExcelForum.com/
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]