Shortcut keys for VBA coding


1. Display the immediate window: Control + G. This window is giving the result of debug.print commands

2. Auto Complete Word: Control + Space

This invokes intellisense

A further press of the Tab key will select the highlighted word

If the Spacebar key instead of the Tab key is pressed it will add a space after selecting the highlighted word.

3. View the Watch Window: Alt + V + H

4. Tab: To move lines of code to the right (Indent).

5. Shift + Tab: To move lines of code to the left (Out dent).

6. Shift + F2: Get the definition of the item under the cursor.

7. Ctrl + Shift + F2: Go to the last cursor position.

8. Alt + F11: Switch between Excel and the VBA Editor.

9. Ctrl + R: View the Project Explorer Window.

10. Ctrl + Shift + 8 (or Ctrl + *): Get the current region on a worksheet.

11. F4: View the Properties Window.

12. F5: Run the code from the current sub.

13. F8: Step into the code.

14. F9 (or click left margin): Add a breakpoint to pause the code.

15. Search keyword under cursor: Ctrl + F3

16. Search the word last searched for: F3

17. Compile the code: Alt + D + Enter OR Alt -> D -> L

18. F7 shows the code

19. Add item under the cursor to the watch window Shift + F9.

20. Show the definition of an enum: Shift + F2

Comments

Popular posts from this blog

VBA Developer - Digitally sign your macro project

Distribute your VBA project to other Microsoft Users

How far can you stretch the Excel LET function?