Why the type mismatch error?

Closed
Fulicasenia Posts 1 Registration date Friday 21 August 2015 Status Member Last seen 21 August 2015 - 21 Aug 2015 à 08:19
xpcman Posts 19528 Registration date Wednesday 8 October 2008 Status Contributor Last seen 15 June 2019 - 21 Aug 2015 à 12:27
My question is in the comment in the code:

Private Sub Worksheet_Change(ByVal Target As Range)

On Error Resume Next

If Target.Cells.Count > 1 Or Target.Value <> "N/A" Then Exit Sub 'adding On Error
' Resume Next made this work, but why do I get a runtime error 13 type mismatch
' error on this line?

If Not Intersect(Target, Range("C10,C11,G10,G11,C17,C18,C21,C37,C38,C41,C42,C45,C46,C63,C64")) Is Nothing Then

If Not Intersect(Target, Range("C10,C11")) Is Nothing Then
Range(Target.Offset(0, 1), Target.Offset(0, 3)).Value = "N/A"
End If

etc etc etc
Related:

1 response

xpcman Posts 19528 Registration date Wednesday 8 October 2008 Status Contributor Last seen 15 June 2019 1,824
21 Aug 2015 à 12:27