Results 1 to 3 of 3

Thread: [Resolved]Listbox with links to forms.

  1. #1

    Thread Starter
    Hyperactive Member LawnNinja's Avatar
    Join Date
    Aug 2006
    Posts
    446

    [Resolved]Listbox with links to forms.

    Can you do a list box than when you say,
    press "1" It goes to the form one and in the next colum, when you press "2" is brings you to the form two, so on and so worth
    Last edited by LawnNinja; Sep 2nd, 2006 at 07:20 PM.

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Listbox with links to forms.

    Do you mean something like this?

    VB Code:
    1. Private Sub List1_Click()
    2.     Select Case (List1.List(List1.ListIndex))
    3.         Case "1":
    4.             Form1.Show
    5.                     Exit Sub
    6.         Case "2":
    7.             Form2.Show
    8.                 Exit Sub
    9.         '...
    10.             '...
    11.                 '...
    12.     End Select
    13.         If List1.ListIndex < List1.ListCount - 1 Then List1.ListIndex = List1.ListIndex + 1
    14. End Sub

  3. #3

    Thread Starter
    Hyperactive Member LawnNinja's Avatar
    Join Date
    Aug 2006
    Posts
    446

    Re: Listbox with links to forms.

    Thanks gavio.

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