I am in need of getting these two codes to work together on the same worksheet.
Any ideas? I've tried several tactics from searching online but i'm missing something somewhere.
The two codes I have are:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo myerror
If Not (Application.Intersect(Target, Range("E8:CQ19, E22:CQ33, E36:CQ47")) Is Nothing) Then
Application.EnableEvents = False
With Target
If (Not .HasFormula) And (.Count = 1) Then Target = UCase(Target.Cells(1))
End With
End If
myerror:
Application.EnableEvents = True
End Sub
and
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address <> "$E$5" Then Exit Sub
Application.EnableEvents = False
MsgBox "I Don't Think So!",
48, "Sorry, I'm protected."
Application.Undo
Application.EnableEvents = True
End Sub
What can i do??
Any ideas? I've tried several tactics from searching online but i'm missing something somewhere.
The two codes I have are:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo myerror
If Not (Application.Intersect(Target, Range("E8:CQ19, E22:CQ33, E36:CQ47")) Is Nothing) Then
Application.EnableEvents = False
With Target
If (Not .HasFormula) And (.Count = 1) Then Target = UCase(Target.Cells(1))
End With
End If
myerror:
Application.EnableEvents = True
End Sub
and
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address <> "$E$5" Then Exit Sub
Application.EnableEvents = False
MsgBox "I Don't Think So!",
48, "Sorry, I'm protected."
Application.Undo
Application.EnableEvents = True
End Sub
What can i do??