I am doing a Find/replace which replaces all text in quotation marks within the range ReplacementRange with a string of text called ReplacementText which is created by some separate code . My current code is:
This works fine, however I was working on something totally separate and manually did a Find/Replace throughout the Workbook (selecting "Workbook" from the Within menu in the Find/Replace options). When I then ran the above code, the Find/Replace in the macro was no longer limited to the ReplacementRange, but instead performed the Find/Replace across the entire workbook, which just wrecked it. How do I limit the Find/Replace range to only the specified range?
VBA Code:
Range("ReplacementRange").Replace What:="""*""", Replacement:="""" & ReplacementText & """"
This works fine, however I was working on something totally separate and manually did a Find/Replace throughout the Workbook (selecting "Workbook" from the Within menu in the Find/Replace options). When I then ran the above code, the Find/Replace in the macro was no longer limited to the ReplacementRange, but instead performed the Find/Replace across the entire workbook, which just wrecked it. How do I limit the Find/Replace range to only the specified range?