Perfect! This will be a great help Bob,
"Bob Phillips" wrote:
>
> 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
>
> "MikeZz" <(E-Mail Removed)> wrote in message
> news:CE960EA4-101B-423E-8F90-(E-Mail Removed)...
> >I have a macro that requires this option to be checked.
> > "Trust access to visual basic project"
> >
> > I know the only way to check the box is either manually or through Send
> > Keys.
> > Is there a way through some property to see if it is checked or unchecked?
> >
> >
> > If there is, I can shut the macro down prior to it crashing with a dialog
> > box telling the user what to do to enable all the features.
> >
> > This would really help!
> >
> > Thanks,
> > MikeZz
>
>
>
|