Results 1 to 2 of 2

Thread: Object arrays

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Preddvor, SI, Slovenia


    I use this declaration so I can create a new object in run time.
    Private WithEvents Carbon As Label
    for carbonnumber=1 to 16
    Set Carbon = Controls.Add("vb.label", "Carbon" & Carbonnumber, picturebox1)
    next carbonnumber

    Now I would like to print the caption of the label with name "carbon16", but I don't know how to get its caption.

    How could I create an array of objects in run time?
    Thanks for your help.


  2. #2
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000

    It'd be a lot easier with an array.

    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

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