I want to determine if a change to a sheet includes cells in one particular row. I tried
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim i As Integer
If ActiveSheet.Name = "Yahoo" Then
If Not Intersect(Target, Range(Cells([YahooID_Row], 1), Cells([YahooID_Row], 999))) Is Nothing Then
Else
End If
End If
End Sub
YahooID_Row is a named integer constant.
I keep getting run time error 1004. How do I do this?
Using the strategy you have tried, here’s a working version of your code
The differfences are
Shparameter rather than the active sheet. The change that triggered the Event may not be from the ActiveSheet.Range(...) toSh[YahooID_Row]is a named constant (rather than a named range) use it as an index