Results 1 to 3 of 3

Thread: Getting forms through their name (not loaded ones)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    Dublin, Ireland
    Posts
    1

    Getting forms through their name (not loaded ones)

    I'm making controls which may interact with other forms (e.g. load them). At the moment I have to raise an event and it's caused me to repeat a huge amount of code which shouldn't need to be repeated. Ideally I would like to have the name of the form as a property of the control. For this to work I would need to be able to load a form with it's name stored in a string.

    Before you point me in the direction of the code on this site it can only access forms which are already loaded.

    Also can VB pass an array to a function? I need to pass the Controls collection of a form to a function.

    Any help on this would be greatly appreciated.

    Thanx
    Subliminal

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Angry Moon pie and chips...£67.99!!!

    VB Code:
    1. 'In module
    2. Public function GetCollection(ByRef MyCollection As Collection)
    3.    'Code here
    4. End Function
    5.  
    6. 'In form
    7. 'To use the above use the below :D
    8. GetCollection mcolMyCollectionFromForm
    Not sure about your 1st problem

    Woka

  3. #3
    New Member
    Join Date
    Jun 2002
    Location
    england
    Posts
    1
    did you get a solution to your first problem regarding loading forms as im having the same problem?

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