Replace Command (Edit Menu)
Last modified: December 06, 2011
Applies to: Office 2013 | VBA
Searches code in the project for the specified text and replaces it with the new text specified in the Replace dialog box.
Toolbar shortcut: . Keyboard shortcut: CTRL+H.
Type or insert the information you want to find, or click the down arrow and select from the last four entries. If any text is selected or the cursor is on a word when you choose the command, this text is displayed in the Find What box.
Type the text you want to use as the replacement text or paste it from the Clipboard. To delete the text in the Find What box from the document, leave the Replace With box empty.
Specifies the search range.
Current Procedure — Searches only the current procedure.
Current Module — Searches only the current module.
Current Project — Searches all the modules in your project.
Selected Text — Searches a selected range of code in your project.
Sets the direction of the search to Down, Up, or All in the selected search range.
Find Whole Word Only
Searches for the full word by itself and not as part of a larger word.
Finds all occurrences with the exact combination of uppercase and lowercase letters specified in the Find What box.
Use Pattern Matching
Searches using pattern-matching characters.
Finds and selects the next occurrence of the text specified in the Find What box.
Closes the dialog box without replacing text.
Confirms before replacing the search text with the replacement text.
Replaces all occurrences of the search text with the replacement text without stopping for confirmation.