Hi,
I have been trying to add a few reference libraries in my vba project. It works fine on my computer but I get this error message when I run it on someone else's computer:
Runtime error '1004':
Programmatic access to Visual Basic Project is not trusted.
The code that I used is:
ThisWorkBook.VBProject.References.AddFromFile ("C:\Program Files\Common Files\System\ADO\msado15.dll")
I know that I can avoid this error by going into Tools-> Macro -> Security and check the box that says trust VBE project (or something like that). However, I'd like to add the reference library without having the user to do that.
I also tried to use late binding but since I was intending to use late binding rather than adding a SAS reference library, some of the functions seems to not work...
Anyone have any thoughts on how I can solve this problem?
Thanks a lot for your time.
Bookmarks