I have a button_click code inside my form as follow:

Code:
   MsgBox(ComboPosIni.SelectedIndex)
   myEPD = New EPD_Class()
ComboPosIni is a combobox that is inside my form. When executing the msgbox displays 1 as item selected.

And in EPD_Class new() i have this code:

Code:
        If (myForm.ComboPosIni.SelectedIndex = 0) then
            MsgBox(myForm.ComboPosIni.SelectedIndex)
            Return
        End If
My problem is that first msgbox show '1' as item selected, and when new() is executed is show '0' as item selected. This is wrong, as both msgbox would have to show the same result.
Is this a bug? how can I solved it?
thanks