Divide by Zero

S

Steve

How Can I get rid of/avoid Divide by 0 Errors?

Somestimes it's unavoidable.

Thanks
Steve
 
M

Mike Painter

Steve said:
How Can I get rid of/avoid Divide by 0 Errors?

Somestimes it's unavoidable.

If Bottom = 0 or IsNull(Bottom) then

msgbox "you can't divide by zero"
else
ans = top/bottom.

end if.

This is a crude solution

While I can think of a few cases where it might cause a problem, usually it
can be avoided with proper design.
 

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