Merhaba,
Aşağıdaki kod ile UserForm üzerinde bulunan Combobox1'e yanlış veri girilince mesaj veriyor ve bir sonraki nesneye gidiyor.
İmleç ComboBox1'e gitmiyor.
Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Combobox1.ListIndex = -1 Then
Combobox1.Text = ""
MsgBox "Kitap seçiniz!", vbExclamation, "Uyarı"
Combobox1.SetFocus
Exit Sub
End If
End Sub
Aşağıdaki kod ile UserForm üzerinde bulunan Combobox1'e yanlış veri girilince mesaj veriyor ve bir sonraki nesneye gidiyor.
İmleç ComboBox1'e gitmiyor.
Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Combobox1.ListIndex = -1 Then
Combobox1.Text = ""
MsgBox "Kitap seçiniz!", vbExclamation, "Uyarı"
Combobox1.SetFocus
Exit Sub
End If
End Sub