* .xlam and missing links in a new VBA project / new Excel instance with add-on enabled

Repro:

  • Launch Excel and open VBE ALT + F11 .

  • Find Tools and click References .

  • Scroll down until you find the Microsoft Scripting Runtime and check it.

  • Save the file as Addin.xlam in the default folder, which should look something like this:

    C:\Users\username\AppData\Roaming\Microsoft\AddIns

  • Close this instance of Excel

  • Launch a new instance and open VBE (now you should see Addin.xlam as the second VBA project available for the book. If you do not open the Developer tab and then add-ons and check the box next to the name to enable it - save, close, open a new instance Excel)

  • Add new standard module

  • Open References and you will see only 4 marked (default)

  • Scroll down and try to find the Microsoft Scripting Dictionary - isn’t it !?

So this basically means that you cannot add a link to the new VBA project (Book1), because your *.xlam already uses it

but

you cannot cross-use the Scripting library because you are trying

 Dim d as Dictionary 

that just created Module1 fails because it does not recognize the Dictionary object ....

Is this somehow a known mistake that I never understood, or was I just missing something completely? Any workarounds?

+5
source share
1 answer

The IDE has recently used links at the top of the list. Do not scroll down. . This is right at the top. I admit it. It made me for the cycle and the second.

VBAProject References

+5
source

Source: https://habr.com/ru/post/1204844/


All Articles