Tech Republic shares a list of 8 special techniques when using the Visual Basic Editor to improve productivity:
Office uses Visual Basic for Applications (VBA), an application development language, to extend functionality beyond its standard features. You might write a simple printing macro or use more complex procedures to perform custom tasks or even apply business rules. To add VBA code to a project, you use the Visual Basic Editor (VBE), a built-in interface. It’s adequate, but some tasks seem harder than necessary. Here are some tips that can help you fine-tune your coding sessions. You’ll spend less time with routine tasks and more time actually coding.
1. Display a little or a lot – Simply click the Procedure View icon in the bottom-left corner of the (code) module. In this view, the VBE displays only the current procedure, so you can’t accidentally scroll into another one.
2. Access procedures – Regardless of which module view you’re using, you can quickly access other procedures in the module by pressing [Ctrl] + Page Up and [Ctrl] + Page Down.
3. Access modules – If you have multiple modules open, you can move between them by pressing [Ctrl] + [Tab]. The access order defaults to the Project Explorer list and not the order in which you last accessed or saved a module.
4. Access procedures and variables – Quick access is helpful, but you might want to view a specific procedure or variable. For instance, you could encounter a call to another procedure and want to review it before continuing.
5. Disable Auto Syntax Check – This feature displays a warning when the syntax for a statement isn’t correct. It’s helpful but often inconvenient. For instance, suppose you’re in the middle of writing a statement when you decide to review another line.
6. Display a variable – While debugging, the VBE displays a variable’s current value in a tooltip. It’s a helpful feature and adequate most of the time. On the rare occasion when the value is over 70 characters, you’ll see only the first 70.
7. Drag the Debug arrow – Debugging tasks usually start with a break point. When VBA encounters that break point, it stops and turns flow control over to you. Most of the time, you’ll press [F8] to execute individual statements.
8. Display items – As you write code, a feature known as Intellisense (similar to AutoComplete ) often displays help. You don’t have to wait for it, though; you can get help by entering the first few characters of a function, property, method, or variable and pressing [Ctrl] + Spacebar to see a list of possible matches