Sub Class_Globals 'or the corresponding module
Dim bChangedFromCode as Boolean = False
End Sub
Sub yourSub
...
dim CK_Search As ChoiceBox
'.... Initialize,AddNode
CK_Search.Items.Add("20")
CK_Search.Items.Add("50")
CK_Search.Items.Add("100")
CK_Search.Items.Add("Show all")
bChangedFromCode = True
CK_Search.SelectedIndex = 0 ' this code
End Sub
Private Sub CK_Search_SelectedIndexChanged(Index As Int, Value As Object) )
If Not(bChangedFromCode) Then
'...process the event here
End If
bChangedFromCode= False
End Sub