Results 1 to 3 of 3

Thread: DLL Collection references

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    4

    Angry DLL Collection references

    I’m sure that this is such an elementary question that only a novice VB code-cutter would ask it but I’ve got a problem that’s giving me serious grief! Incidentally, I am a novice VB code-cutter so be gentle with me!!!

    I’ve built a .DLL that defines a “Public” Collection in the Declarations section of a Class module:

    Public myCollection As New Collection

    The collection is populated and referenced by the calling .EXE – everything OK.

    I’ve subsequently added, to the .DLL, a form comprising text boxes and command buttons. I need to give the form’s event processor “Subs” access to the collection – abject miserable failure!

    For some reason, no doubt a very basic one, every method that I've tried to provide a reference to the collection object from the Form module has failed. Initially, I thought that because it is declared as “Public” that all Subs/Functions in the .DLL project would have access to it. Apparently this is not so!

    Can anyone end my suffering - Please!

    manassas

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Post the code you are trying to get to work and maybe we'll see whats up.

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Create a property on the form that takes a collection as an arguement. Then pass in the collection and set a private object reference to the collection in the forms general declarations.

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