#DIV/0!


Posted by JC on May 29, 2001 1:47 PM

Ive written a program that does various analysis.
In it some cells wind up being divided by zero.
THese cells get a screen value of (#DIV/0!).
There value in VBA read into a variable becomes for example (P = Error2700)
I am trying to write a comand to notice these as the program continues, and when the cell is called let it be equal to 0. But I cannot seem to write an if to recognize Error2700. What do I do?

Posted by Jerid on May 29, 2001 2:04 PM

Hi JC.

Try this


Dim vTemp As Variant

vTemp = ActiveCell

If vTemp = CVErr(2007) Then
ActiveCell.Value = 0
End If

Jerid



Posted by JC on May 29, 2001 2:26 PM

Thanks
WLAC!