Good day all!
I am using the below code in a large project. My dependent cells have formulas in them with several resulting in a blank "" cell. I believe Error 1004 no cells were found occurs if a dependent cell is blank. I'm new to VBA, and assuming it would be better to change my code to account for a blank dependent cell rather than ignoring it with Resume Next. I was hoping that testing for not equal to "" (as shown below) would fix the problem but it isn't. Any ideas how I could prevent the error entirely?
Thanks so much!
I am using the below code in a large project. My dependent cells have formulas in them with several resulting in a blank "" cell. I believe Error 1004 no cells were found occurs if a dependent cell is blank. I'm new to VBA, and assuming it would be better to change my code to account for a blank dependent cell rather than ignoring it with Resume Next. I was hoping that testing for not equal to "" (as shown below) would fix the problem but it isn't. Any ideas how I could prevent the error entirely?
Code:
If Not Intersect(Target.Dependents, Me.Range("F7:F36")) Is Nothing Then
If Target.Dependents > 71 And Target.Dependents <> "" Then
More code here
End if
End if
Thanks so much!