Results 1 to 2 of 2

Thread: Values from index

  1. #1
    antma
    Guest

    Values from index

    hello fellow earthlings!!

    I have a slight problem .I have a control array with indexes 0 to 15 . now once u click on one of them , it must return the index value of that control and into a variable

    Please help!!!

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    You don't say what type of control it is, but assuming it's a command button, you can do something like this. (Note: VB automatically gives you the Index value in the Sub header for control arrays.)
    Code:
    Private Sub cmdMyButton_Click(Index As Integer)
    
        Dim intMyInt   As Integer
    
        intMyInt = Index
    
    End Sub
    "It's cold gin time again ..."

    Check out my website here.

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