Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("J3"), Target) Is Nothing Or Intersect(Range("J3"), Target) = "Select a Player from the list" Then MsgBox "No Player was selected." Exit Sub End If ActiveSheet.Unprotect Application.ScreenUpdating = False Dim amt As Worksheet, wow As Worksheet Dim w As Long Dim x As Range Set amt = Worksheets("Admin MGR Teams") Set wow = Worksheets("WhoOwnsWho") w = amt.Cells(Rows.Count, 1).End(xlUp).Row Set x = amt.Range("A2:A" & w) x.Copy wow.Range("D11").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Set x = amt.Range("B2:P" & w) x.Copy wow.Range("G11").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Application.ScreenUpdating = True 'ActiveSheet.Protect End Sub
I’m a little confused.
J3 is a data validation list.
I am trying to use a change event on J3. If the cell changes to “” or “Select a Player from the list”, then I get the expected Msgbox and the sub is exited.
If J3 changes to something else from the list, then I am getting error 91 with the If statement being highlighted. However, the first copy & paste instruction does execute.
If I change the If statement to:
If Range(“J3”) Is Nothing Or Range(“J3”) = “Select a Player from the list” Then
The procedure goes into repeated execution and never ends. What am I missing?