Private Sub Text1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then Select Case Val(Text1.Text) Case Is nb_a_trouver: Label1.Caption "gagné" Case Is > nb_a_trouver: Label1.Caption = "trop grand" Case Else: Label1.Caption = "trop petit" End Select KeyCode = 0 Text1.Text = "" End If End Sub
existe t'il sous Excel ou Flash
a_trouver = Int((50000 * Rnd) + 1)
Private nb_a_trouver As Long Private Sub Command1_Click() Randomize nb_a_trouver = Int((50000 * Rnd) + 1) Text1.Text = "" End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Select Case Val(Text1.Text) Case Is nb_a_trouver: Label1.Caption "gagné" Case Is > nb_a_trouver: Label1.Caption = "trop grand" Case Else: Label1.Caption = "trop petit" End Select KeyAscii = 0 Text1.Text = "" End If End Sub
Et après j'ai encore raté une gare ou un continent?
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.