
31-01-2008, 12:51
|
|
|
|
חבר מתאריך: 07.10.06
הודעות: 1,795
|
|
יש דרכים מובנות ב-VB, אבל יש איתן בעיות.
הדרך הזו, הכי אמינה לדעתי:
קוד:
Private Sub Combo1_Click()
Dim IfFond As Boolean
IfFond = False
For x = 0 To Combo1.ListCount - 1
If Combo1.Text = Combo1.List(x) Then
IfFond = True
Exit For
End If
Next
If IfFond = False Then
MsgBox "choose from list please"
End If
End Sub
וכדי שזה יפעל בכל המיקרים, (חוץ משליחת הודעה והזרקה לזיכרון) תיקרא מהאירוע Change לעירוע Click:
קוד:
Private Sub Combo1_Change()
Combo1_Click
End Sub
|