Hi everyone,
I have a file in which I inserted a sub Worksheet_change that automatically transforms the user input (in this case only the names and surnames of members) in capital letters.
I have another file in which it is transformed into "day MONTH year", ex. "6 OCTOBER 2018", the date entered by the user.
I can not get the two subs to live on the same sheet, because I would like to capitalize both the names and the date.
I attach sample files.
Thanks for the tips!
Matt
I have a file in which I inserted a sub Worksheet_change that automatically transforms the user input (in this case only the names and surnames of members) in capital letters.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
''''''''''''''''''''''''''''''''''''''''''''
'Forces text to UPPER case for the range A1:B20
''''''''''''''''''''''''''''''''''''''''''''
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
If Not Intersect(Target, Range("A1:B20")) Is Nothing Then
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End If
On Error GoTo 0
End Sub
I have another file in which it is transformed into "day MONTH year", ex. "6 OCTOBER 2018", the date entered by the user.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
If Not Intersect(Target, Range("D1")) Is Nothing Then
If Target <> "" Then
Target = UCase(Format(Target, "D MMMM YYYY"))
End If
End If
Application.EnableEvents = True
End Sub
I can not get the two subs to live on the same sheet, because I would like to capitalize both the names and the date.
I attach sample files.
Thanks for the tips!
Matt