still learning
Well-known Member
- Joined
- Jan 15, 2010
- Messages
- 826
- Office Version
- 365
- Platform
- Windows
Hi
I’m trying to add more to this change event macro
The first part works perfectly. What every text is entered in a cell in column 4 is changed to proper case.
I’m trying to get column 1 and column 2 to change the format when a date is entered.
Column 1 and column will only have dates in them
What I get now is “FALSE”
mike
I’m trying to add more to this change event macro
The first part works perfectly. What every text is entered in a cell in column 4 is changed to proper case.
I’m trying to get column 1 and column 2 to change the format when a date is entered.
Column 1 and column will only have dates in them
What I get now is “FALSE”
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
Application.EnableEvents = False
Target.Value = Application.Proper(Target.Value).
Application.EnableEvents = True
End If
If Target.Column = 1 Then
Application.EnableEvents = False
Target.Value = Selection.NumberFormat = "mm/dd/yy"
Application.EnableEvents = True
End If
If Target.Column = 2 Then
Application.EnableEvents = False
Target.Value = Selection.NumberFormat = "mm/dd/yy"
Application.EnableEvents = True
End If
End Sub
mike