VBA IntelliSence Not Appearing / Working, How Do I Get It To Work?

Anonymous
2024-05-19T17:57:55+00:00

I am trying to wrote VBA code in Excel and realize that InetlliSense is not working.

I noticed / tested this by typing "docmd." and noting that when tying the "." that:

i) A list of options did not appear;

ii) Pressing CTRL + J resulted in a beeping sound; and

iii) Pressing CTRL + Spacebar resulted in beeping sound.

I then went into a block of I was writing which included:

      Din FoundCell As Range

     Set FoundCell = ws.Columns("B").

and once again the IntelliSense is not working (i.e., the list of methods did not appear, pressing CTRL + J resulted in a beeping sound, and pressing CTRL + Spacebar resulted in beeping sound).

I then -- as the final test -- went on to type " Set FoundCell = ws.Columns("B").Find(" and again InetlliSense is not working (i.e., the list of methods did not appear, pressing CTRL + J resulted in a beeping sound, and pressing CTRL + Spacebar resulted in beeping sound).

I should also note that I have the following references selected:

It is hard enough to code let alone code without IntelliSense.

THE ASK: Please explain how to get IntelliSense to work..

Thank you.

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote

8 answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-05-19T18:34:48+00:00

    docked is not a keyword in any of the active libraries, so it is to be expected that nothing happens when you type docking followed by a dot (point).

    Did you declare ws as a Worksheet object in your code?

    Columns is an unfortunate example - there is indeed no IntelliSense for Columns.

    If you declared ws, the following should work:

    Set FoundCell = ws.Range("B:B").
    

    or

    Set FoundCell = ws.Range("B:B").Find(
    
    0 comments No comments
  2. Anonymous
    2024-05-19T19:30:50+00:00

    Apologies and appreciate your assistance.

    As to “docked.”, it should have been “docmd.”, spellcheck interfered. As such i do believe that IntelliSense should have provided a list of methods.

    As to your code, I will check in about 90 minutes when I get home.

    Thank you.

    0 comments No comments
  3. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-05-19T20:00:14+00:00

    DoCmd is in VBA for Access, not in VBA for Excel...

    0 comments No comments
  4. Anonymous
    2024-05-19T20:49:01+00:00

    Hans,V, much thanks.

    I am now more confused than ever:

    1. This worked...

    Image

    1. This worked....

    Image

    1. But this did not work...

    What am I doing wrong? What am I missing? Why does it work in 1. and 2. but not 3.?

    Thank you.

    0 comments No comments
  5. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-05-19T21:00:21+00:00

    That is because you haven't declared the variable ws in the FindLifeExpectancyRow procedure.

    Since the VBA interpreter doesn't know what ws is, it also doesn't know what ws.Range("B:B") is.

    If you insert the line

        Dim ws As Worksheet
    

    in the declaration section of FindLifeExpectancyRow , IntelliSense should work.

    0 comments No comments