xrezax
جمعه 05 آذر 1389, 11:48 صبح
بچه ها من تمام شرطام اینن ، می خوام وقتی کاربر کلمه ای بغیر از (12و13و14و15و16و17و18و19) بزنه برنامه یه msgbox "error" نشون بده
If InStr(1, GetPM.Text, "12", vbTextCompare) > 0 Then
Command2_Click
End If
If InStr(1, GetPM.Text, "13", vbTextCompare) > 0 Then
Command3_Click
End If
If InStr(1, GetPM.Text, "14", vbTextCompare) > 0 Then
Command4_Click
End If
If InStr(1, GetPM.Text, "15", vbTextCompare) > 0 Then
Command5_Click
End If
If InStr(1, GetPM.Text, "16", vbTextCompare) > 0 Then
Command6_Click
End If
If InStr(1, GetPM.Text, "17", vbTextCompare) > 0 Then
Command7_Click
End If
If InStr(1, GetPM.Text, "18", vbTextCompare) > 0 Then
Command8_Click
End If
If InStr(1, GetPM.Text, "19", vbTextCompare) > 0 Then
Command9_Click
End If
If InStr(1, GetPM.Text, "12", vbTextCompare) > 0 Then
Command2_Click
End If
If InStr(1, GetPM.Text, "13", vbTextCompare) > 0 Then
Command3_Click
End If
If InStr(1, GetPM.Text, "14", vbTextCompare) > 0 Then
Command4_Click
End If
If InStr(1, GetPM.Text, "15", vbTextCompare) > 0 Then
Command5_Click
End If
If InStr(1, GetPM.Text, "16", vbTextCompare) > 0 Then
Command6_Click
End If
If InStr(1, GetPM.Text, "17", vbTextCompare) > 0 Then
Command7_Click
End If
If InStr(1, GetPM.Text, "18", vbTextCompare) > 0 Then
Command8_Click
End If
If InStr(1, GetPM.Text, "19", vbTextCompare) > 0 Then
Command9_Click
End If