Results 1 to 3 of 3

Thread: Similar functions

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Posts
    21

    Similar functions

    basically i have a lot of buttons doing an identical job except for one number difference.
    ie
    preset1
    load from preset1
    do other things involving the number 1
    end sub

    preset2
    load from preset2
    do other things involving the number 2
    end sub

    my question is whether its possible to have a control name ie preset1 as a variable, so that its a combination of a string and a variable
    ie preset = "preset" & a
    where preset is a variable and a is a number. then i could do things to the variable such as preset.forecolor=.. or whatever. and then preset would refer to the control needed, ie preset1,preset2 etc.
    does this make any sense? sorry if it doesnt
    thanks people

  2. #2
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    Control Array.

    Create a command button.
    Then copy and paste as many as you want saying yes to control array.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Posts
    21
    aha - nice and simple.

    thanks a lot

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