Find and replace in code

jpl458

Well-known member
Local time
Yesterday, 16:13
Joined
Mar 30, 2012
Messages
1,218
If in the code window and you highlight a section of code will find and be restricted to the highlighted portion of the code, or will it run rampant through all the code, and other objects as well?
 
It is restricted to the selected area. Just tried it out.
 
Depends what you specify in the Find & Replace dialog. If you leave it set on Selected Text then it only searches the selected text.
 
Also you can make changes one at a time, and you can select procedure, module or project, as well as selected text.

However, It's also possible to change everything by mistake, and there's no undo!
 
If you are not used to using Find & Replace, do NOT use it without first making a backup. Like many useful tools, this one can chop your head off if you don't understand it.
 
I've used it a lot, and was aware of the possibility of a beheading. I see that is preset to Selection, which is a good thing

Thanks for the warning
 
The other thing, as you click the "replace" button, the next code module opens, and the "replace" control form can jump around on the screen. I'm sure we've all casually clicked "find next" several times, and then inadvertently clicked "replace all", as the control form moved.
 
The other thing, as you click the "replace" button, the next code module opens, and the "replace" control form can jump around on the screen. I'm sure we've all casually clicked "find next" several times, and then inadvertently clicked "replace all", as the control form moved.
That's why you have F3.
I always keep Find & Replace dialog box open and search with F3. And then if necessary, click replace button.
It helps not to mis-click the buttons.
 

Users who are viewing this thread

Back
Top Bottom