bluefeather8989
Active Member
- Joined
- Nov 20, 2009
- Messages
- 325
- Office Version
- 365
- Platform
- Windows
Every time I delete a range of cells in G:G i get runtime error '13': The highlighted code is
Target = UCase(Target)
How can I prevent this from happening? Here is the full code
Target = UCase(Target)
How can I prevent this from happening? Here is the full code
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 7 And Target.Cells.Count = 1 Then
If Target.Value = "" Then
If Range("Q6").Value = "1" Then
Call short_Date1
ActiveCell.Offset(1, -1).Range("A1").Select
ElseIf Range("Q6").Value = "" Then
Call Episode1
ElseIf Target.Value = "*" Or Target.Value = "NO" Or Target.Value = "RR" Then
If Range("Q6").Value = "1" Then
Call short_Date1
ActiveCell.Offset(1, -2).Range("A1").Select
Else
Call Episode1
ActiveCell.Offset(0, -3).Range("A1").Select
End If
End If
End If
End If
Dim sReason As String
Application.EnableEvents = False
If Not Intersect(Target, Range("G:G")) Is Nothing Then
Target = UCase(Target)
End If
Application.EnableEvents = True
End Sub