Results 1 to 2 of 2

Thread: help...get an object with a string

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Location
    Florida
    Posts
    24

    help...get an object with a string

    I have the following code in a form:
    WithEvents cmd_inorg_clp_11and12 As New Button()
    WithEvents chk_inorg_clp_11and12 As New CheckBox()

    along with many more

    is there a way to assign an object to one of these using a string by the same name?

    I want to:

    dim ctl as object
    ctl = cmd_inorg_clp_11and12

    using a string by the same name ("cmd_inorg_clp_11and12")
    retrieved from reading a table

    in other words I need to add a control to a form based on their names in a table.

    thanks

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    use a if statement or select case...

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