Hi

I have an Excel sheet with VBA which is designed to compare two boxes
of text/copy and highlight any differences. The existing code is very
good although, it does not currently highlight individual words (it
only changes the box color to red to suggest there is an error).

Here is the existing code (the spreadsheet can also be shared if that
would be useful?):

        'check the spelling of the selected text
        Select Case bcheck
            Case True
                If SpellingIsCorrect(sCopy) = False Then
                    If .Range("Q" & plRow).Value = "" Then
                        .Range("Q" & plRow).Value = "Check
ASFspelling"
                    Else
                        .Range("Q" & plRow).Value = .Range("Q"
&plRow).Value & " | Check ASF spelling"
                    End If
                End If
                If SpellingIsCorrect(sEmail) = False Then
                    If .Range("Q" & plRow).Value = "" Then
                        .Range("Q" & plRow).Value = "Check email
spelling"
                    Else
                        .Range("Q" & plRow).Value = .Range("Q"
&plRow).Value & " | Check email spelling"
                    End If
                    .Range("J" & plRow).Select 'background = red
asthis is an error
                    With Selection.Interior
                        .Pattern = xlSolid
                        .PatternColorIndex = xlAutomatic
                        .ThemeColor = xlThemeColorAccent2
                        .TintAndShade = 0.399945066682943
                        .PatternTintAndShade = 0
                    End With
                End If
            Case Else
                'do nothing as we do not want to check the spelling in
anything but the above sections
        End Select

Is it possible to adapt the code so that individual (incorrectly
spelt) words are highlighted (rather than the whole block)?

Any help much appreciated,

Kind regards

Greg

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to