VBE Navigation Shortcuts

I just discovered this by accident. Everyone else probably knows it, but just in case, I’ll post it here.

In the VBE’s Project Explorer, you can use Ctrl+Tab to cycle through the modules. Here’s the kicker: It only cycles through the modules that are used. If you’re not using ThisWorkbook or Sheet1, it doesn’t stop at those modules.

I’ll be using this a lot now that I know about it. Particularly to go between a UserForm and the code behind it. Yep, Ctrl+Shift+Tab goes the other way (although my fingers don’t go there naturally yet).

I discovered by trying to hit Shift+Tab to un-indent a block of code.

What VBE shortcuts do you find handy?

Posted in Uncategorized

5 thoughts on “VBE Navigation Shortcuts

  1. Ctrl+F6 works the same as Ctrl+Tab. And, as you probably know, both of these key combinations also work in the Excel window (to cycle through workbooks).

  2. John:

    When I “discovered” this, I was looking that the Project Explorer and watching the active module change. What I didn’t realize until I read your comment was that it wasn’t cycling through the modules, but through the open code panes. It was not skipping those modules because they were empty, it was skipping them because I didn’t have a code pane open for them. In summary, I’m an idiot.

  3. Ah, but you’re an honorable idiot. A lesser man would have just deleted the post and pretended that it never happened.

  4. It would actually be better to have a shortcut scrolling through all the USED modules (i.e. with code in it) (in a project or so), whether opened or not. Even better, ignore modules with *only* Option Explicit in it at the top.


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.