![]() ![]() It's a bit in the weeds, but I thought someone might have insights. From what I can see, the VBA library (VBE7.dll according to the References dialog and the Object Browser) does not actually show a VBE member in the Object Browser, so maybe the order of references has nothing to do with this (and it seems I can't change that order anyway). Copy and paste the code from this article into the code window. Ultimately I don't know what is happening differently when I fully qualify Application.VBE versus when I don't. Click within the workbook where you want to insert the VBA code, click Insert > Module. ![]() I get intellisense for various enums and constants, but not all the objects and things I get if I type Set foo = Application.VBE. This may relate to why I can Set foo = application.VBE, and from there access the various members, but I can't Set foo = VBIDE.VBE. The VBIDE library has a class VBE, but possibly I should notice that it does not have members. ![]() In the Object Browser, I see the Excel library has a Class, Application, with a "Property VBE as VBE". It seems Visual Basic For Applications has to come first? In my references I currently have "Visual Basic for Applications" first and then "Microsoft Excel 16.0 Object Library." Interestingly, it doesn't let me change their priority order. To me, this implies the trust setting applies only if VBE is accessed through the Application library, and not wherever the not-fully-qualified version was getting it. I found that if I fully qualify it works. I'm in Excel, and the trust option is checked. I just had the curious experience where if I tried to access VBE.ActiveVBProject I was given Run-time error '6068' "Programmatic access to Visual Basic Project is not Trusted." ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |