happyhungarian
Active Member
- Joined
- Jul 19, 2011
- Messages
- 254
- Office Version
- 365
- Platform
- Windows
Hi, I have two change events occuring on the same tab. It's currently erroring out on the highlighted RED section. What needs to be created?! Thanks!
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("i3:AZ3")) Is Nothing Then
Dim response
response = MsgBox("Delete Category?", vbYesNo, "Tyvak Nano-Satellite Systems, Inc.")
If response = vbNo Then
Exit Sub
End If
ActiveCell.EntireColumn.Delete (xlLeft)
End If
End If
If Selection.Count = 1 Then
If Not Intersect(Target, Range("b15:b100")) Is Nothing Then
Dim response2
response2 = MsgBox("Delete Task?", vbYesNo, "Tyvak Nano-Satellite Systems, Inc.")
If response = vbNo Then
Exit Sub
End If
ActiveCell.EntireRow.Delete (xlUp)
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("i3:AZ3")) Is Nothing Then
Dim response
response = MsgBox("Delete Category?", vbYesNo, "Tyvak Nano-Satellite Systems, Inc.")
If response = vbNo Then
Exit Sub
End If
ActiveCell.EntireColumn.Delete (xlLeft)
End If
End If
If Selection.Count = 1 Then
If Not Intersect(Target, Range("b15:b100")) Is Nothing Then
Dim response2
response2 = MsgBox("Delete Task?", vbYesNo, "Tyvak Nano-Satellite Systems, Inc.")
If response = vbNo Then
Exit Sub
End If
ActiveCell.EntireRow.Delete (xlUp)
End If
End If
End Sub