Programmatic Accès To Visual Basic Project Is Not Trusted

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Programmatic Accès To Visual Basic Project Is Not Trusted

Message par ForumBot »

I have two scheduled tasks on my computer. They both open Excel files and run a macro & are pretty similar in what they do. They both work on my computer. However I moved the scheduled tasks onto a colleague’s computer. One worked the other didn’t.


The one that didn’t work opened Excel but had an error saying:



“programmatic access to visual basic project is not trusted”.


Like I say, both Excel files are very similar. The one that didn’t work does reference two additional projects the other one does not. They are,


Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Windows Common Controls-2.6.0 (SP6)


I have never come across this error before.

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: Programmatic Accès To Visual Basic Project Is Not Trusted

Message par ayi »

File → Options → Trust Center → Trust Center Setttings → Macro Settings → Trust Access to the VBA Project object model.


This is usually needed if you are referencing Extensibility library.

Répondre

Revenir à « Excel & VBA »