Did you know there is a keyboard shortcut that forces the IntelliSense dropdown to appear when writing VBA?
TIP: [Ctrl] + [Spacebar] will force the IntelliSense dropdown to appear.
When would this be useful? After all, IntelliSense normally appears automatically. The following steps will demonstrate the usefulness of this keyboard shortcut:
Typical IntelliSense Usage
- Go to the Immediate Window
- The IntelliSense dropdown appears:
Making IntelliSense Disappear
DoCmd.Beepthen press [Spacebar] to add a space and force the dropdown to close
- Now press [Backspace] five times to delete the space and the letters
- You should now see
DoCmd.but without the IntelliSense dropdown:
Bringing IntelliSense Back From the Dead
- Ensure your cursor is still to the right of the period in
- Press [Ctrl] + [Spacebar]
- The IntelliSense is back!
There are a several reasons why IntelliSense might not appear when you're writing VBA. Here are a few:
- There is a compile error in your code (press [Alt] + [D], [L] to force a compile and reveal the error)
- There are no methods or properties to show for the object you are working with (this often trips people up when switching from early to late binding to automate Office applications; variables defined
As Objectwill not have any IntelliSense)
- There is only one possible IntelliSense match (in this case, instead of showing the IntelliSense dropdown, the text will simply autocomplete immediately)
I'm sure there are other scenarios I'm leaving out, but these are three common cases.