vb6 combo box
hi all,
in vb6 is there a way i can find what the original selected index was on the combobox click event?
why i ask?
say we have on form_load 3rd index item selected.
we then select nth item in the combobox.
I need to compared the index of the nth item with that original selected during the click event fired.
I do not want use global or page variables to store the index to get the index.
Thanks in advance for the help
Mustafa
www.hostukdomain.com
[527 byte] By [
mhadamji] at [2007-11-11 8:37:37]

# 2 Re: vb6 combo box
i think you can use some code like that as event "onClick" for the combobox , but note that thereis a for example textbox named "dAta" and it's index is "0" and another textbox named "dAtacnt" and it's value is "0" and your combobox is named as "cOmbo" , this method and code is very very basic one for demonstartion only , you can use variables as Mr.Phil said before ...
dAtacnt.text = dAtacnt.text + 1
load dAta (dAtacnt.text)
dAta(dAtacnt.text).text = cOmbo.text
and now to get the values of your 'before' selected items in control "cOmbo" you can use e.g. :-
' This will MsgBox the first selected item in "cOmbo"
MsgBox dAta(1).text
and so on
hope that helped you ,,
AHHB at 2007-11-11 17:26:20 >

# 4 Re: vb6 combo box
mhadamji,store the current index in the Tag property of the ComboBox,in the click event.Now when you select another item - & before the code which stores the current index in the Tag property is executed in the click event - compare the current index to the previous one as stored in Tag.Simple,isn't?
# 5 Re: vb6 combo box
hi softraj..
yes its an elegant way to store current index in the list,combo,radio and checkbox...
i initial stragled but eventual found the tag property.. handy thing..
thanks...
Mustafa
www.hostukdomain.com