|
-
Apr 22nd, 2007, 11:07 AM
#1
Thread Starter
Frenzied Member
[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
-
Apr 22nd, 2007, 01:05 PM
#2
Re: [2005] Function
I don't quite understand your question... Can you repharse it?
-
Apr 22nd, 2007, 01:10 PM
#3
Hyperactive Member
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! 
-
Apr 22nd, 2007, 01:14 PM
#4
Thread Starter
Frenzied Member
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
-
Apr 22nd, 2007, 01:24 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|