textbox.setfocus is executing textbox_exit event twice sometimes in vba excel

  • [xpost]


    i have 6 checkbox,3 listbox and 6 textbox with values as 10. Iam adding some values based on check box1.value=true (i.e) AA0,AA1 and AA2to the listbox1 .

    Iam adding some values based on check box2.value=true (i.e) BA0,BA1and BA2to listbox 2.

    if I select an item in the listbox(AA0,AA1,AA2) and if the textbox1.text is >10 or null then I have to set the focus(text1.setfocus) in the listbox_change event

    in this code when I click the chkbox1 or 2 or 3 and select the options in the Listbox1 OR Listbox2 or listbox3 sometimes in any one of the three I am getting the msg MsgBox "PLEASE CHK THE mark " and the selected item in the listbox gets deselected and the focus goes to textbox.

    Pls Help

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!