Invalid procedure call or argument

  • Thread starter Thread starter Philosophaie
  • Start date Start date
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.
 
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.
 
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.
 

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

Back
Top