A
ADK
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo addError
If Not (Application.Intersect(Target, Range("E7:H10000")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
If Not (Application.Intersect(Target, Range("I7:J10000")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
Exit Sub
addError:
Select Case Err
Case 13:
Exit Sub
Case Else:
Open ThisWorkbook.Path & "\ErrorLog.log" For Append As #2 'Open file
Print #2, Application.Text(Now(), "mm/dd/yyyy HH:mm") _
; Error(Err); Err 'Write data
Close #2 'Close
MsgBox "An error has occurred, contact John Doe (extension 123)"
End Select
End Sub
On Error GoTo addError
If Not (Application.Intersect(Target, Range("E7:H10000")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
If Not (Application.Intersect(Target, Range("I7:J10000")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
Exit Sub
addError:
Select Case Err
Case 13:
Exit Sub
Case Else:
Open ThisWorkbook.Path & "\ErrorLog.log" For Append As #2 'Open file
Print #2, Application.Text(Now(), "mm/dd/yyyy HH:mm") _
; Error(Err); Err 'Write data
Close #2 'Close
MsgBox "An error has occurred, contact John Doe (extension 123)"
End Select
End Sub