top of page

VBE_Extras catch-up #9: Go to declaration above / below

  • Writer: John
    John
  • 3 days ago
  • 2 min read
When I first made VBE_Extras available for download, it contained a whole load of functionality that I never wrote blog posts about. I'm now setting that right for a few of the core areas of that functionality.

When you have a Module with many members (i.e. Module-level declarations such as Consts, Enums, Sub, Functions etc), it can sometimes be handy to just jump through each of those declarations in turn, in the order that they are present in the Module. That is the point of the "Goto declaration above" and "Goto declaration below" commands in VBE_Extras.


You can trigger these commands through the VBE's main menu (Extras > Goto > Declaration above / Declaration below). However, much more convenient is to use the keyboard shortcuts associated with the commands which, by default, are Ctrl+Shift+, (that's a comma) for "Goto declaration above" and Ctrl+Shift+. (that's a full-stop) for "Goto declaration below". Note that keyboard shortcuts in VBE_Extras can be switched on or off and can be customised ... check the "Shortcut Keys" tab of the Settings.


Here's an example of the commands being used in which is an entirely contrived Module ... but designed so that you can easily see what is happening each time one of the keyboard shortcuts is pressed in order to trigger the command.


Jumping through declarations in a Module

Note that each of the commands "wrap around" ... if you are at the last declaration and use the "Go to declaration below" command then the first declaration in the Module will be selected; if you are at the first declaration and use the "Go to declaration above" command then the last declaration in the Module will be selected.


Prefer a list of all declarations (within a procedure, Module or the entire Project) instead of jumping to each declaration? Use the Declarations > In this procedure / Module / Project command instead.

Comments


bottom of page