View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] avpendse@gmail.com is offline
external usenet poster
 
Posts: 11
Default Error check on sheet



Steph wrote:
Hello. Is there a way to simply scan Sheet1, and determine if any cells
equate to an error? I am taking data from a sheet and uploading it t an
external system. I'd like to have the macro stop as soon as it finds an
error anywhere in sheet1. Thanks so much.



try this :
Dim oError
On Error Resume Next
Set oError = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas,
xlErrors)
If TypeName(oError) = "Empty" Then
Debug.Print "No Error"
Else
Debug.Print "Error"
End If
Err.Clear