Making Intellisense work in Access VBA

I’ve just had a little problem where I was programming with a ListView control in Access and, for some reason my Intellisense broke in VBA so I couldn’t get access to the handy dropdown of methods and properties that comes in so useful as you’re developing.  I tried changing settings in VBA to no avail, but eventually found a solution.

If you’re suffering similar problems try the following steps:-

Create a module-level variable with type as ListView, for example:-

Dim MyListView as ListView

Then, in the Form_Load event, add code to reference the new variable to your listview control, like this:-

Set MyListView = [your listview name here].Object

And from this point refer to your listview control using the variable name rather than the name of the actual control. All your intellisense will come back perfectly. I know it seems a long-winded way around fixing things but hey, it works!  I’ve not tried it with everything, but I would assume that the same method will work for any controls for whom Intellisense seems broken.

One comment

  • Pingback: VBA

  • Leave a Reply

    Your email address will not be published. Required fields are marked *