Results 1 to 5 of 5

Thread: "not trusted" err msg ? [RESOLVED] added code..

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    TZI Transition Date
    Posts
    272

    Resolved "not trusted" err msg ? [RESOLVED] added code..

    anyone know why i get this error ?
    1004Programmatic access to Visual Basic Project is not trusted

    also if i just run [MsgBox Application.VBE.ActiveVBProject.References.Count] without error handling i get:
    1004Method 'VBE' of object '_Application' failed
    - BUT, only on the second and subsequent attempts...

    from excel run:
    VB Code:
    1. Sub A1A1()
    2.     On Error GoTo errMsg
    3.     MsgBox Application.VBE.ActiveVBProject.References.Count
    4. errMsg:
    5.     ActiveCell = Err.Number & Err.Description
    6.     Err.Clear
    7. End Sub
    Last edited by MJBNET; Mar 26th, 2005 at 05:43 PM. Reason: added results

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width