Navigating with Bookmarks

In the process of analyzing or reviewing your VBA procedures you will often find yourself jumping to certain code areas. Using the built-in bookmark feature, you can easily mark the spots you want to navigate between.

To set up a bookmark:

1. Click anywhere in the statement you want to define as a bookmark.

2. Choose Edit | Bookmarks | Toggle Bookmark (or click the Toggle Bookmark button on the Edit toolbar). Visual Basic will place a blue, rounded rectangle in the left margin beside the statement (see Figure 9-16).

Part I

Figure 9-16: Using bookmarks, you can quickly jump between often-used sections of your procedures.

Once you've set up two or more bookmarks, you can jump between the marked locations of your code by choosing Edit | Bookmark | Next Bookmark or simply click the Next Bookmark button on the Edit toolbar. You may also right-click anywhere in the Code window and select Next Bookmark from the shortcut menu. To go to the previous bookmark, select Previous Bookmark instead. You can remove bookmarks at any time by choosing Edit | Bookmarks | Clear All or by clicking the Clear All Bookmarks button on the Edit toolbar. To remove a single bookmark, click anywhere in the bookmarked statement and choose Edit | Bookmarks | Toggle Bookmark, or click the Toggle Bookmark button on the Edit toolbar.

0 0

Post a comment