Thread: [Solved] Puzzling Behavior
View Single Post
 
Old 03-25-2024, 12:55 PM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You don't have Selection.Find.Found in your code. I don't see how it would return anything.


With this code and your example and instructions, it returns "True"


Sub ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
With Selection.Find
.Text = "X-"
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
MsgBox .Found
End With
lbl_Exit:
Exit Sub

End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote