trust access to Visual Basic Project checked


B

Boss

Can i check "trust access to Visual Basic Project" under tools, macro,
security, using macro..
please help...

Thanks!
Boss
 
Ad

Advertisements

B

Bob Phillips

No, it would make a slight mockery of any security pretence don't you think.
But you can check it and tell the user to do it.


Function VBAIsTrusted() As Boolean
Dim mpVBC As Object
Dim mpAlerts As Boolean
mpAlerts = Application.DisplayAlerts
Application.DisplayAlerts = False
On Error Resume Next
Set mpVBC = ThisWorkbook.VBProject.VBComponents.Item(1)
On Error GoTo 0
Application.DisplayAlerts = mpAlerts
VBAIsTrusted = Not mpVBC Is Nothing
End Function
 
B

Boss

Thanks for the reply Bob,

But something can be done using the commandbar ID.

I found it in a different community.

Thanks!
 
B

Bob Phillips

Care to show us, I would be intrigued to see how the security is
circumvented.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top