Run Intellisense constantly in VBA

jantokus

New Member
Joined
Mar 30, 2006
Messages
11
I would like VBA to automatically list the available objects/properties/methods as I write (i believe this is called Intellisense). However, after every line, I have to activate it again by pressing Ctrl-j. How can I make it run constantly? Thanks a lot in advance.

Jan
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
While in the VBE, click Tools > Options > Editor tab.

Place a checkmark next to
"Require Variable Declaration" (always a good idea)
and
"Auto List Members"

Click OK to exit the Options dialog.
 
Upvote 0
Maybe you are expecting to see the list during times when Intellisense is not bound to be active. If you enter an object and press the period (or dot) key, the methods and or properties will appear in the pop-up list with the settings established as suggested above. Otherwise, the list disappearing might be what is supposed to happen if no code is being edited from which Intellisense would be triggered.
 
Upvote 0
Thanks Tom, I think I know what you mean. But I do expect Intellisense to be triggered, here is a simple example:

Range("A1").Select
Selection.Copy

When pressing Ctrl-j before typing the first line, Intellisense pops up and lists the "Range" and "Select" items (it does not pop up when I do not press Ctrl-j, although my boxes are checked in the options menu). When pressing enter after the first line, and typing "s" to get the "Selection" of the second line, Intellisense does not pop up. I have to press Ctrl-j again to activate it. Is the second line a "non-trigger"? Or does my Intellisense have a serious attitude problem? Thanks!

Jan
 
Upvote 0
Based on how I read your posts, my understanding of Intellisense is that your expectation of when you'd see pop-ups exceeds when pop-ups are meant to occur, considering how Microsoft built the Intellisense feature into Excel.

For example, regardless of any settings, I would not expect to see the pop-up based on your scenario with this you wrote:
"When pressing enter after the first line, and typing "s" to get the "Selection" of the second line, Intellisense does not pop up."

In this regard, Intellisense is Intellisense, it is not Intelli-mind-reading. Neither Excel nor VBA would have any way of knowing that the word "Selection" is the word you plan to invoke by hitting the "s" key. That next word might be "Sheets" or "Sort" or "Subtotals" or "SpecialCells" given the "s".

The key issue here is context. Intellisense depends on the context of the code and displays all possible completions for input. Because you hit the Enter key to start a new code line, there is no context for Intellisense to recognize, even by typing in the letter "s", until a complete object name is entered, then a period, to set the code context Intellisense requires.
 
Upvote 0
Ah, I think I have mistaken what Intellisense actually is. I have meant the automatical pop up of the list of ranges/properties/methods as I type. It may well have a totally different name. For instance, when I type "s" at the beginning of the line, nothing occurs. But when I press Ctrl-j before starting te type that line and then press "s", a list pops up, in which I can choose an item. Whith "s", the list starts with "SavePicture". When typing "sel", "Selection" is the active item in the list and I can finish it by pressing the Tab button.
As I am new to VBA, it is handy and quick for me, as I can choose the avalable commands from the list. If this is not Intellisense, I am sorry for misleading you.
Can I make this list pop up constantly when I type (I have all the boxes checked in the options menu)? Now, I have to press Ctrl-j so many times the keys are due for replacement. Hope I am not expecting too much from VBA. Thanks Tom!
 
Upvote 0
Can I make this list pop up constantly when I type (I have all the boxes checked in the options menu)?
No. The behavior that Microsoft built into the list you describe is not able to be manipulated in the VBE such that it is viewable all the time. As I wrote in my last post, that pop-up list is only viewable when the code context is conducive, and the afore-posted settings are established.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,737
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top