View Single Post
 
Old 03-19-2018, 04:35 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Code:
#1:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cell   As Range
    If Intersect(Target, [C8:D30]) Is Nothing Then Exit Sub
    Application.EnableEvents = False
    For Each cell In Intersect(Target, [C8:D30])
        cell = UCase(cell)
    Next
    Application.EnableEvents = True
End Sub


#2:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cell   As Range
    On Error Resume Next
    Set Target = Range("C8:D30")
    Application.EnableEvents = False
    For Each cell In Target
        cell = UCase(cell)
    Next
    Application.EnableEvents = True
End Sub
Reply With Quote