Use VB6's bookmarks to make code navigation easier

Wading through source code of can be extremely time consuming. If you want to reduce your code navigation time, then see how you can set up bookmarks in VB6 that will allow you to move quickly between several code locations in one or more modules.

Advance your scripting skills to the next level with TechRepublic's free Visual Basic newsletter, delivered each Friday. Automatically sign up today!

In a large, complex program it can sometimes be difficult to navigate your way around the source code. If you need to move quickly between several code locations in one or more modules, you can speed the process with bookmarks.

To set a bookmark on a line of code or to remove an existing bookmark, place the cursor on the line and select Edit | Bookmarks | Toggle Bookmark. A bookmarked line is marked by a blue rectangle in the left margin. Bookmarks are not named in VB6.

To move between bookmarks, select Edit | Bookmarks and then select Next Bookmark. VB moves the editing cursor to the next bookmark in the current module; or, if you are already at the last bookmark, VB moves the editing cursor to the first bookmark in the next module. Select Previous Bookmark to move backwards through the bookmarks.

To clear all bookmarks from the project, select Edit | Bookmarks | Clear All Bookmarks. The Editing toolbar contains buttons for all four bookmark-related commands.

Editor's Picks

Free Newsletters, In your Inbox