I have code that removes extra spaces. The user is prompted for each change. When they user agrees to the change, I would like to make the change, then pause for 1/2 second to allow the user to see what the change is before moving on to the next item to correct. This would allow them to cancel out of the program and undo the change if they disagree with it.
How can I introduce this 1/2 second delay?
' Turn on screen updating
Application.ScreenUpdating = True
' Remove spaces before paragraph marks
mySearchRegExpression = " {1,}^013"
With Selection.Find
.ClearFormatting
Do While .Execute(findText:=mySearchRegExpression, MatchWildcards:=True, Forward:=True, Wrap:=wdFindContinue) = True
result = MsgBox("Remove extra space(s)?", vbYesNoCancel)
If result = vbYes Then
Selection.TypeParagraph ' This works just like hitting the enter key
ElseIf result = vbNo Then
' MsgBox "You clicked No"
Else
GoTo EndOfFunction
End If
findCounter = findCounter + 1
Loop
End With