Hi All,
I have the following piece of VBA code that ensures if a name is entered in column 14 then then it makes sure its proper case or changes it. However when you paste in more then one line in to column 14 i get the error: Run-Time Error '13' Type Mismatch. Can anyone think how to stop this happening?
Thanks
Tom
I have the following piece of VBA code that ensures if a name is entered in column 14 then then it makes sure its proper case or changes it. However when you paste in more then one line in to column 14 i get the error: Run-Time Error '13' Type Mismatch. Can anyone think how to stop this happening?
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)'Force Proper Case in Name Column
Application.EnableEvents = False
If Target.Column = 14 Then
Target = StrConv(Target, vbProperCase)
End If
Application.EnableEvents = True
End Sub
Thanks
Tom