LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default bizarre "invalid procedure call" error

Just because the equation is solvable doesn't mean it doesn't deal in the
realm of imaginary numbers. Since only a subset of roots of negative real
numbers would result in non-imaginary numbers, I think it is clear that the
authors of VBA have chosen to error on such a construct. While this may be
inconsistent with Excel, there is no reason to expect them to be the same in
this gray area - VBA is a separate product that has been coupled with Excel.
They don't share common code.

--
Regards,
Tom Ogilvy

"PatFinegan " wrote in message
...
Dear Tom,

Thanks for pointing out the difference between orders of operation in
VBA and Excel.

However, to clarify, my first post c= -1^.5 should indeed have
generated an error because the square root of a negative number is
imaginary. I immediately regretted posting it because it cluttered two
very distinct issues -- the handling of imaginary numbers and a
computational inconsistency between Excel and VBA.

That's why I added a second equation, c = -1 ^ (1/3), because the cube
root of a negative number is not imaginary and should therefore not
result in an error. But as I wrote, the equation worked fine in an
Excel spreadsheet but bombed in VBA. It is that latter computational
discrepency that I find troubling, since the equation is definitely
"solvable". Sorry if that wasn't clear.


---
Message posted from http://www.ExcelForum.com/





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error "invalid data source reference" for pivot table Manny Excel Worksheet Functions 6 April 5th 23 02:58 PM
Run-time Error '5' - Invalid procedure call or argument Trefor Excel Discussion (Misc queries) 2 December 17th 07 03:32 AM
error: "invalid character in text conent" How do I open this file RTH Excel Discussion (Misc queries) 5 April 23rd 06 03:04 PM
Run-time error '5': Invalid Procedure Call or Argument Nikila Excel Discussion (Misc queries) 2 February 24th 06 09:26 PM
Run-time error '5':Invalid Procedure call or argument Jan Refsdal Excel Programming 1 July 25th 03 05:14 AM


All times are GMT +1. The time now is 06:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"