ActiveX Error RRS feed

  • Question

  • User-1610848648 posted

    Coming from VB6 this is my first foray into the world of .NET and I have run into an issue. Here is some very simple code to get the list of AD users into a listbox:

    Dim Container As IADsContainer
    Dim Child As IADs
    Container = GetObject("LDAP://ou=Users,dc=RISCPL,dc=local")
    Container.Filter = "user"
    For Each Child In Container
    Next Child

    When I hit the button that calls it I get an error:

    System.Exception was unhandled
    Message="Cannot create ActiveX component."

    Can anyone tell me what I have to do to get this code to work? I have been googling for hours and cannot find anything that helps :(.

    Monday, August 10, 2009 10:07 PM

All replies

  • User789930283 posted


    The problem may be due to Browser security settings.

    try by changing the browser security settings

    Enable Initialize and script  Active X Controls not marked as safe for Scripting

    Tuesday, August 11, 2009 7:40 AM