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