I have a sub that uses several variables and functions in a loop, similar to this:

       

For i = 1 to 100
        If (type = "CC" And TF = 1 And CC_1 (var1, var2, var3) = 1) Or _
           (type = "CC" And TF = 2 And CC_2 (var1, var2, var3) = 1) Or _
           (type = "PB" And TF = 3 And CC_3 (var1, var2, var3) = 1)  _
        Then
        quantity = quantity+ 1
Next i
Every once in a while, the data that the functions above use will be missing or misplaced, which will cause an error. Is there a way to skip the function with an error in it and keep the loop and the "or" sequence going?

Thanks