While Besoin D'aide

Résolu
cs_cricri_forever Messages postés 49 Date d'inscription mercredi 28 septembre 2005 Statut Membre Dernière intervention 31 mars 2006 - 4 oct. 2005 à 23:43
PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 - 5 oct. 2005 à 01:22

1 réponse

PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 47
5 oct. 2005 à 01:22
10 textbox comme décrit dans ton énoncé
2 boutons pour bien comprendre le principe


Private Sub Form_Load()
'init
Txt_Table(0).Text = "2"
Txt_Table(1).Text = "3"
Txt_Table(2).Text = "5"
Txt_Table(3).Text = "7"
Txt_Table(4).Text = "13"
End Sub
'
'
Private Sub Cmd_CalculFor_Click()
Dim i As Integer, j As Integer
For i = 0 To 4
Txt_Reponse(i).Text = ""
For j = 1 To 10
Txt_Reponse(i).Text = Txt_Reponse(i).Text & CStr (j * Val(Txt_Table(i).Text)) & " - "
Next j
'on enlève le dernier " - " qui traine
Txt_Reponse(i).Text = LeftB(Txt_Reponse(i).Text, LenB(Txt_Reponse(i).Text) - 6)
Next i
End Sub
'
'
Private Sub Cmd_CalculWhile_Click()
Dim i As Integer, j As Integer
i = 0
Do While i < 5
Txt_Reponse(i).Text = ""
j = 1
Do While j < 11
Txt_Reponse(i).Text = Txt_Reponse(i).Text & CStr (j * Val(Txt_Table(i).Text)) & " - "
j = j + 1
Loop
'on enlève le dernier " - " qui traine
Txt_Reponse(i).Text = LeftB(Txt_Reponse(i).Text, LenB (Txt_Reponse(i).Text) - 6)
i = i + 1
Loop
End Sub


<SMALL> Coloration syntaxique automatique [AFCK]</SMALL>


pas de Message Privé pour çà stp
PCPT
3
Rejoignez-nous