Answering a MsgBox with VBA code?

F

Fred Holmes

The following recorded keystroke macro:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/27/2004 by xxxxx
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Fails to record the last user action, clicking on the "No" option of
the MsgBox that inquires "Word has finished searching the selection,
would you like to search the remainder of the document?"

Is there a vba statement that I can manually add that will
automatically answer "No" to that MsgBox?

Thanks,

Fred Holmes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top