Take the following simple macro:
Range("A1:C1").Select
Selection.Replace What:="OldText", Replacement:="NewText", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A3").Select
The macro stops after the Selection.Replace [...] statement; it makes the replacements OK, but stays on range A1:C1 and never selects range A3. I cannot get the macro do to *anything* after the Selection.Replace task. The macro does not show any error; just stops.
I suspect this is because Excel would normally pop up an info dialog "Excel has completed its search and has made [n] replacements" (on which the user has to click OK), although I do not see this dialog when running the macro. Could this be causing the macro to freeze? Is there a way of suppressing this Replace info dialog from within the macro? I tried Application.DisplayAlerts = False - to no avail.
Bookmarks