G
Guest
Dear all, having tried to REPLACE "=" with "&" (to inactivate and activate an
add-in formula) in two different worksheets of the same workbook, the
"replace function" (see below macro) only works in the first (active)
worksheet. Suggestions?:
Sub Macro1()
Columns("B:E").Select
Selection.Replace What:="=INF", Replacement:="&INF", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet 2").Select
Application.Goto Reference:="Area2"
Selection.Replace What:="&INF", Replacement:="=INF", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet 1").Select
MsgBox ("Ready")
End Sub
It might be that "activating" the formula (chaning to "=") demands some
processing time, and a "wait" command is needed. However it seems my macro is
not even moving to sheet 2.
Kind regards /Jan
add-in formula) in two different worksheets of the same workbook, the
"replace function" (see below macro) only works in the first (active)
worksheet. Suggestions?:
Sub Macro1()
Columns("B:E").Select
Selection.Replace What:="=INF", Replacement:="&INF", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet 2").Select
Application.Goto Reference:="Area2"
Selection.Replace What:="&INF", Replacement:="=INF", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet 1").Select
MsgBox ("Ready")
End Sub
It might be that "activating" the formula (chaning to "=") demands some
processing time, and a "wait" command is needed. However it seems my macro is
not even moving to sheet 2.
Kind regards /Jan