Results 1 to 5 of 5

Thread: command button control array?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    93

    command button control array?

    Lets say I have a form, "frmA" with several command buttons in a control array. when a button is pressed, another form is loaded. is there any way to know which button from frmA was pressed to get to frmB, aside from creating a variable in frmA and accessing it in frmB?

  2. #2
    Fanatic Member khalik_ash's Avatar
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    724
    have a public varible in frmB and before u load frmB assign the button index to it...

    hope i got it right... did i

  3. #3
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    Private sub Command1_Click(Index as Integer)
    frmB.Show
    frmB.Tag = Index
    End sub

    then frmB.Tag would contain the index of the button clicked.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  4. #4
    Fanatic Member khalik_ash's Avatar
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    724
    i always do this...

    declare unwanted varibles...
    follow BuggyProgrammer suggestion


  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    93
    I had been doing the variable way...but I like the tag idea much better, thanks!

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