Searching for Text in Code

See Also379TGAW

To search for specific text in the Code windowJ73QNY

   1. From the Edit menu, choose Find (Ctrl+F).

   2. In the Find What text box, type the text you want to search for.  If any text is selected when you choose the command, this text is displayed in the text box.  If no text is selected, the word at the current insertion point is displayed.

   3. Select a Search option button to specify where to look for the text:

     Current Procedure searches in the current procedure only.

     Current Module searches in the active module only.

     All Modules searches all the code in your project, including all forms.

   4. To set limits on the search, select the Match Whole Word Only check box to search only for the complete word by itself, and not as part of another word.  Select the Use Pattern Matching check box to search using pattern matching characters191OZWN.

   5. Choose OK.

     Visual Basic finds the first occurrence of the text.

   6. To find the next or previous occurrence of the text, choose Find Next or Find Previous from the Edit menu.

Keyboard Shortcuts

Press           To


Ctrl+F            Find: display Find dialog box.

F3                 Find Next: repeat text search down through your code.

Shift+F3         Find Previous: repeat text search up through your code.

See Also


Finding a Procedure1CNGZXN

Replacing Text in Code7N96V2