Thread: [Solved] Making exceptions to PROPER
View Single Post
 
Old 06-03-2018, 05:42 PM
Chayes Chayes is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: May 2012
Posts: 79
Chayes is on a distinguished road
Default Making exceptions to PROPER

Hi All


I use this code to force Proper case in columns F:H




Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub

On Error Resume Next

If Not Intersect(Target, Range("F:H")) Is Nothing Then

Application.EnableEvents = False

Target = StrConv(Target, vbProperCase)

Application.EnableEvents = True

End If

On Error GoTo 0



End Sub




This works fine , but sometimes fails in certain circumstances , particularly after symbols. For example , after brackets. The code in this case forces (Content) to (content).


Can someone help with an amendment to the code so that letters following symbols are left as capitals?


Grateful for any advice.




Very Best Wishes ,
Reply With Quote