Thread: [Solved] Puzzling Behavior
View Single Post
 
Old 03-25-2024, 03:15 PM
Italophile Italophile is offline Windows 11 Office 2021
Expert
 
Join Date: Mar 2022
Posts: 542
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Just tested your code by printing result to immediate window. It returns True every time.

Code:
Sub Find()
    With Selection.Find
        .Text = "X-"
        .Forward = False
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Debug.Print Selection.Find.Execute
End Sub
Reply With Quote