I have created a code to auto capitalise a column and auto proper another column.
The code works until I try to delete data from the proper column and I then get an error code which I cannot figure out how to correct.
Any help would be much appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("I:I")) Is Nothing Then
Target.Value = UCase(Application.Substitute(Target.Value, " ", ""))
End If
Application.EnableEvents = True
Application.EnableEvents = False
If Not Intersect(Target, Range("D:D")) Is Nothing Then
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub
Bookmarks