Find Command (Edit Menu)
Searches for the specified text in a search range specified in the Find dialog box.
If a search is successful, the Find dialog box closes and Visual Basic selects the located text. If no match is found, Visual Basic displays a message stating that the text was not found.
Toolbar shortcut: . Keyboard shortcut: CTRL+F.
Finds and selects the next occurrence of the text specified in the Find What box of the Find dialog box.
Toolbar shortcut: . Keyboard shortcuts: SHIFT+F4 (Find Next) or SHIFT+F3 (Find Previous).
Dialog Box Options
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.
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 or Up from the location of the cursor, 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 performing the search.
Displays the Replace dialog box, retaining the information typed in the Find What dialog box.