That isn't the only division you do - the very next line does it too:
..so when sngYMax and sngYMin are equal (or very close to it), sngYNumInc will be 0 and cause the error on the next line.Code:sngYNumInc = (sngYMax - sngYMin) / iYAxisHeight iReturn = (sngYMax - YValue) / sngYNumInc
This is one of those situations where line numbers should make corrections much easier.




Reply With Quote