I want to make sure of no divison by zero error messages
I am doing division on a mshflexgrid like this:
with grid
.textmatrix(2, 12) = .textmatrix(2, 11) / .textmatrix(2, 9)
some of the cells maybe empty and some maybe formated as currency with a dollar sign
is this the best method:
would this code be appropriate?vb Code:
If val(.textmatrix(2, 11) <> 0 then If val(.textmatrix(2, 9) <> 0 then .textmatrix(2, 12) = .textmatrix(2, 11) / .textmatrix(2, 9) else textmatrix(2, 12) = "" end if end if




Reply With Quote