S
Seanie
How can I select multiple ranges within a Change event code? I've
tried below but I hit debug
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count = 1 Then
If Not Intersect(.Cells, Range("J10:J22", "J28:J40",
"J46:J58", "J64:J76", "J82:J94", "J100:J112", "J118:J130")) Is Nothing
Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End If
End With
End Sub
tried below but I hit debug
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count = 1 Then
If Not Intersect(.Cells, Range("J10:J22", "J28:J40",
"J46:J58", "J64:J76", "J82:J94", "J100:J112", "J118:J130")) Is Nothing
Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End If
End With
End Sub