Results 1 to 5 of 5

Thread: [2005] Function

  1. #1

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    [2005] Function

    Hi, i think it's called function the thing i would like to use. There are different text list in my combobox1, and ti would like to use also diffrent code for every text list, so i will like it to make it like this if combobox1.text = "123" then do code a ...

    tanks

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2005] Function

    I don't quite understand your question... Can you repharse it?

  3. #3
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    419

    Re: [2005] Function

    if your saying what i think you are trying to say then you have basically put the code there.

    Code:
    if combobox1.text = "123" Then
    'code e.g...
    msgbox("you selected 123")
    end if
    just add more elseif's or an else if you need to add more to that.
    If a post has been usefull then Rate it!

  4. #4

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: [2005] Function

    well, ex. let's say that there is a combobox and in that box there is these list
    Yahoo
    Gmail
    MSN
    and when the user click on yahoo i would like him to take him to yahoo page
    when he click on gmail i would like him to take him to gmail webpage.
    ....
    i could use the if but in my case the codes contain other if so it won't be good. So i wanted to make a group of code so when he select the yahoo i would like him to run the first group code...

    tanks

  5. #5
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2005] Function

    Use a combobox event (selectedIndexChanged, SelectedValueChanged....) and you read the selected index/item to see what it is. Once you know what it is, you can use If or select case to execute the appropriate code.

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