ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invalid procedure call or argument (https://www.excelbanter.com/excel-programming/432534-invalid-procedure-call-argument.html)

Philosophaie

Invalid procedure call or argument
 
Keep getting Run-time error '5': Invalid procedure call or argument.

The line of code is:

x=(y/C)^0.5

Tried to change x to x1 still same error.

OssieMac

Invalid procedure call or argument
 
One of the values appear to be outside what the computer can calculate. When
you get the error, select debug and hover the cursor ober each of the
variables y and c and see if you can read their values.

Also what have you got them declared as in the Dim statement?
Try
Dim x As Double
Dim y As Double
Dim c As Double

and see if that makes a difference.

--
Regards,

OssieMac


"Philosophaie" wrote:

Keep getting Run-time error '5': Invalid procedure call or argument.

The line of code is:

x=(y/C)^0.5

Tried to change x to x1 still same error.


joel

Invalid procedure call or argument
 
I suspect you have a X or Y defined as something other than a variable. Make
sure you don't have a function or sub call X, Y , or C.

"Philosophaie" wrote:

Keep getting Run-time error '5': Invalid procedure call or argument.

The line of code is:

x=(y/C)^0.5

Tried to change x to x1 still same error.


keiji kounoike

Invalid procedure call or argument
 
Is the value of (y/C) positive? if it is negative, this error could occur.

Keiji

Philosophaie wrote:
Keep getting Run-time error '5': Invalid procedure call or argument.

The line of code is:

x=(y/C)^0.5

Tried to change x to x1 still same error.



All times are GMT +1. The time now is 04:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com