Results 1 to 3 of 3

Thread: variables that point to other variables cause invalid qualifier (obviously), fixible?

  1. #1
    Nit
    Guest

    variables that point to other variables cause invalid qualifier (obviously), fixible?

    I have a class that holds some collections,
    forsimplicity I will call them 1Coll, 2Coll, 3 Coll.

    Ok

    What I would like to do is circumnavigate the usual 'write 10 millions lines of cod which is exactly the same but for a different variable' situation

    the situation is this:

    each collection holds some data, I want to operate on the data according to user inputs

    for example

    UserInput = msgbox("enter a collection to use","a message", "1Coll")

    for count = 1 to Userinput.count
    tempvar = tempvar & UserInput.(count)
    next count

    the text in italics is what I want to specify a particular collection....
    and I dont want reams of case statements in my class code, so is there a way round/to achieve this? there is in C++ cause you can assign pointers and stuff... I think this is what I need here

    manythanks
    Nit

  2. #2
    Nit
    Guest

    Unhappy


  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I would try the CallByName() Function, it may do what you need.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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