S Steve Aug 26, 2004 #1 How Can I get rid of/avoid Divide by 0 Errors? Somestimes it's unavoidable. Thanks Steve
M Mike Painter Aug 26, 2004 #2 Steve said: How Can I get rid of/avoid Divide by 0 Errors? Somestimes it's unavoidable. Click to expand... 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.
Steve said: How Can I get rid of/avoid Divide by 0 Errors? Somestimes it's unavoidable. Click to expand... 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.
P Peter R. Fletcher Aug 30, 2004 #3 If you know that the divisor in a calculation may, under some circumstances, be zero, you must explicitly test for that possibility befoe you perform the calculation. How Can I get rid of/avoid Divide by 0 Errors? Somestimes it's unavoidable. Thanks Steve Click to expand... Please respond to the Newsgroup, so that others may benefit from the exchange. Peter R. Fletcher
If you know that the divisor in a calculation may, under some circumstances, be zero, you must explicitly test for that possibility befoe you perform the calculation. How Can I get rid of/avoid Divide by 0 Errors? Somestimes it's unavoidable. Thanks Steve Click to expand... Please respond to the Newsgroup, so that others may benefit from the exchange. Peter R. Fletcher