-
[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
-
Re: [2005] Function
I don't quite understand your question... Can you repharse it?
-
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.
-
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
-
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.