Results 1 to 3 of 3

Thread: ActiveX reference to object error

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    New Zealand
    Posts
    27

    ActiveX reference to object error

    I have an ActiveX with a particular property declared as Object.
    I pass the the object as a parameter. The object I pass is a menu object. So, if the control needs to be able to popup a menu, it would have a direct reference to the menu object to do so.

    My problem is that it seems to work in Dev mode, but when the ActiveX is compiled and used in another project, it would generate the following error:

    The instruction at "0x734b3ee7" referenced memory at "0x00835006". The memory could not be "read"

    The ActiveX name is VisiLink
    This is how I pass the object:
    Set VisiLink.PopMenu = mnuAlignment

    PopMenu is the name for the object type property in the ActiveX.
    MnuAlignment is a menu item with subitems.

    Inside the ActiveX, I call the menu like this:
    PopupMenu PopMenu, vbPopupMenuLeftAlign, LeftPos, TopPos

    This works while in Dev mode. As soon as I compile the control and use it in another project, the error message appears saying the memory could not be read.

    Can someone perhaps tell what am I doing wrong ?
    Is there a better way to reference the menu object of the parent form from within an AvtiveX control ?

    Thanks in advance.

    Graham

  2. #2
    Lively Member
    Join Date
    Aug 2002
    Posts
    126
    r u sure that the other project has the same menu object in the form that host the ActiveX control?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    New Zealand
    Posts
    27
    Since I pass the object as in:
    Set VisiLink.PopMenu = mnuAlignment
    from the parent form, I expect it is a reference to the same object when one uses it in the control.

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