Quick Tip: Force IntelliSense to Appear When Writing VBA
Does the IntelliSense dropdown ever disappear when you're writing VBA? Do you backspace and re-type the dot to get it back? There's a better way.
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
- Type
DoCmd.
- The IntelliSense dropdown appears:
Making IntelliSense Disappear
- Type
DoCmd.Beep
then press [Spacebar] to add a space and force the dropdown to close - Now press [Backspace] five times to delete the space and the letters
Beep
- 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
DoCmd.
- Press [Ctrl] + [Spacebar]
- The IntelliSense is back!
Not Working?
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 Object
will 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.