![]() |
trust access to Visual Basic Project checked
Can i check "trust access to Visual Basic Project" under tools, macro,
security, using macro.. please help... Thanks! Boss |
trust access to Visual Basic Project checked
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 -- __________________________________ HTH Bob "Boss" wrote in message ... Can i check "trust access to Visual Basic Project" under tools, macro, security, using macro.. please help... Thanks! Boss |
trust access to Visual Basic Project checked
Thanks for the reply Bob,
But something can be done using the commandbar ID. I found it in a different community. Thanks! "Bob Phillips" wrote: 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 -- __________________________________ HTH Bob "Boss" wrote in message ... Can i check "trust access to Visual Basic Project" under tools, macro, security, using macro.. please help... Thanks! Boss |
trust access to Visual Basic Project checked
Care to show us, I would be intrigued to see how the security is
circumvented. -- __________________________________ HTH Bob "Boss" wrote in message ... Thanks for the reply Bob, But something can be done using the commandbar ID. I found it in a different community. Thanks! "Bob Phillips" wrote: 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 -- __________________________________ HTH Bob "Boss" wrote in message ... Can i check "trust access to Visual Basic Project" under tools, macro, security, using macro.. please help... Thanks! Boss |
trust access to Visual Basic Project checked
You were correct. Its not possible..
Thanks! Boss "Bob Phillips" wrote: Care to show us, I would be intrigued to see how the security is circumvented. -- __________________________________ HTH Bob "Boss" wrote in message ... Thanks for the reply Bob, But something can be done using the commandbar ID. I found it in a different community. Thanks! "Bob Phillips" wrote: 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 -- __________________________________ HTH Bob "Boss" wrote in message ... Can i check "trust access to Visual Basic Project" under tools, macro, security, using macro.. please help... Thanks! Boss |
All times are GMT +1. The time now is 08:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com