For next sur label et textbox

ConsultantJP

XLDnaute Occasionnel
Bonjour à tous,

Je suis en train de faire un tentative infructieuse de next for sur des labels et textbox mais en vain je n'y arrive pas. Mon code bloque sur le label des le départ.

Savez vous ou est mon erreur ?

Merci

Code:
For i = 2 To 40
monlabel = Label(i)
Matxt = TextBox(i).Value
monTrt = Application.WorksheetFunction.VLookup(monlabel, Worksheets(2).Range("A2:B500"), 2)

Do While FeuilleResultat.Cells(IntegrationLigne, 1) <> ""
    IntegrationLigne = IntegrationLigne + 1
Loop
If Matxt <> "" Then

FeuilleResultat.Cells(IntegrationLigne, 4).Value = "WP"
FeuilleResultat.Cells(IntegrationLigne, 5).Value = "Transactionnel"
FeuilleResultat.Cells(IntegrationLigne, 6).Value = monlabel

FeuilleResultat.Cells(IntegrationLigne, 7).Value = Matxt
FeuilleResultat.Cells(IntegrationLigne, 8).Value = Application.UserName
FeuilleResultat.Cells(IntegrationLigne, 9).Value = monTrt

FeuilleResultat.Cells(IntegrationLigne, 10).Value = monTrt * Matxt
End If
Next i
 

ConsultantJP

XLDnaute Occasionnel
Re : For next sur label et textbox

ce sera mieux avec mon code raté :

Code:
Private Sub ComboBox1_Change()
Dim i
Dim valeur
Dim MaChk

If ComboBox1.Value = "Souscription" Then
'Souscription representé sur la colonne B
For i = 2 To 21
valeur = Sheets("MotifDeSuspens").Range("B" & i)
MaChk = Controls("CheckBox" & i)

MaChk.Caption = valeur
Next
End If

End Sub
 

Discussions similaires

Réponses
3
Affichages
367

Statistiques des forums

Discussions
312 778
Messages
2 092 038
Membres
105 161
dernier inscrit
lorina