Invalid procedure call or argument

P

Philosophaie

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.
 
O

OssieMac

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.
 
J

Joel

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.
 
K

keiji kounoike

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

Keiji
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top