View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John[_22_] John[_22_] is offline
external usenet poster
 
Posts: 694
Default Find errors in Excel.

Hi
Please forgive me for intruding but I find the question interesting and I was
wondering if it could be put in a Loop with a Msgbox appearing at each find.
I'm here to learn, I wish I could help.
Regards
John
"Jan Kronsell" wrote in message
...
I have this code:

Sub t()
For Each s In ActiveWorkbook.Sheets
For Each c In s.UsedRange.Cells
If IsError(c) Then
errval = c.Value
If errval = CVErr(xlErrRef) Then
c.Interior.ColorIndex = 3
End If
End If
Next c
Next s
End Sub

It colors all cells red, if the contains the #REF! error. The problem is, that
my client would like it to select the first instans of the error and stop.
When he runs it a second time, it should stop with the second instans and so
on.

I don't see how this can be done?

Jan