If ActiveCell.Value < -2 Or ActiveCell.Value 2 Then
'Checks not zero - Error message and stop process
If MsgBox("Not all validations are 0, please review sheet Checks. " & vbCr & _
"Continue ?", vbYesNo, "Look at Me") = vbNo Then Exit Sub
End If
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"A. Karatas"
wrote in message
The following codesnipped throws me out of the procedure if the
cellvalue is found between 2 and -2. I would like to have the
opportunity that the messagebox gives me the option to continue (yes
or no). It also sometimes occure that the cellvalue = #DIV0!. if that
is the case I would like to have the same option (or for any other
error value).
'Check whether all checks are 0
Application.Goto Reference:="Total_Check"
If ActiveCell.Value < -2 Or ActiveCell.Value 2 Then
'Checks not zero - Error message and stop process
MsgBox ("Not all validations are 0, pls review sheet
Checks. Process will be stopped.")
Exit Sub
End If
I came with something like this, but it is not working properly. Excel
is going bezerk and trows me out of the system (referenced memory!!!!)
'Check whether all checks are 0
Application.Goto Reference:="Total_Check"
If ActiveCell.Value < -2 Or ActiveCell.Value 2 Or
ActiveCell.Value = "#DIV0!" Then
warn = "Not all validations are 0, pls review sheet
Checks. End process?"
Ans = MsgBox(warn, vbYesNo)
If Ans = vbYes Then
Exit Sub
End If
End If
Any idea's are very welcome.
Thankx