tylerstoehr
New Member
- Joined
- Aug 27, 2014
- Messages
- 5
Hello,
I am trying to combine a couple of simple VBA Change codes but am unable to get both working at the same time. The one coded first works, the second doesn't.
Very simple, I am very new to this all help is greatly appreciated.
Thank you in advance!
I am trying to combine a couple of simple VBA Change codes but am unable to get both working at the same time. The one coded first works, the second doesn't.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If Intersect(Target, Range("A:A,F:F")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
Target.Value = UCase(Target.Value) 'Sets range values to uppercase
Application.EnableEvents = True
End With
With Target
If Intersect(Target, Range("C:C")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
Target.Value = StrConv(Target.Value, vbProperCase) 'Sets range to proper case
Application.EnableEvents = True
End With
End Sub
Very simple, I am very new to this all help is greatly appreciated.
Thank you in advance!