![]() |
#1
|
|||
|
|||
![]()
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 , |
#2
|
||||
|
||||
![]()
Hi
as you have already 50+ posts you should know 1. It is important to post in the correct forum, be it for you or the other members 2. Code should be wrapped with code tags. I will move the post Please add tags - Thanks
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
||||
|
||||
![]()
Try:
Code:
Target = Application.Proper(Target) |
#4
|
|||
|
|||
![]()
HI
Ok Yes , that's fixed it - thanks! Very Best Wishes , |
#5
|
|||
|
|||
![]()
Sorry for putting this in the wrong place. I will try to use the correct quotes in future.
|
#6
|
||||
|
||||
![]()
And please add code tags.....
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#7
|
|||
|
|||
![]()
Yes , I'll try to do that in the future. I wouldn't know how to do it on a 'solved' post. The site assumes a lot of knowledge which a user may not necessarily have.
![]() |
#8
|
||||
|
||||
![]()
Just edit the relevant post - click "Go advanced" - select your code and click the #button
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#9
|
|||
|
|||
![]()
Ok I'll be sure to do that in the future. Thank you for your advice.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
batota06 | Excel | 2 | 06-11-2018 01:53 AM |
Exceptions on my documents | Martinod | Word | 1 | 03-12-2018 11:53 AM |
Word Autocorrect exceptions not working. | Spotofpaint | Word | 0 | 10-23-2014 06:14 PM |
Autocorrect Exceptions not working | danvdr | Word | 6 | 05-26-2014 09:37 PM |
Exceptions for 'Capitalize first letter of sentences' | gazpacho | Word | 1 | 01-12-2012 11:43 AM |