Erreur d'exécution 13, incompatibilité de typ
juliet
-
juliet -
juliet -
Bonjour,
J'ai un probléme, car a priori j'ai écrit la meme chose sur deux userforms différents, il y en a un qui marche et l'autre erreur d'éxécution 13, incompatibilté de type. ESt ce que il y a quelque que je pourrai vérifier. merci
Celui la marche:
Private Sub UserForm_Activate()
TextBox1.Enabled = False
i = 3
If TextBox1.Value = "SIL9" Then
Do While Worksheets("Cu").Cells(3, i) <> ""
If IsNumeric(Worksheets("Cu").Cells(3, i).Value) Then
ListBox1.AddItem Worksheets("Cu").Cells(2, i).Value
End If
i = i + 1
Loop
End If
End Sub
Celui la marche pas:
Private Sub UserForm_Activate()
TextBox1.Enabled = False
i = 4
If TextBox1.Value = "SIL9" Then
Do While Worksheets("granulo").Cells(3, i) <> ""
If IsNumeric(Worksheets("granulo").Cells(3, i).Value) Then
ListBox1.AddItem Worksheets("granulo").Cells(2, i).Value
End If
i = i + 1
Loop
End If
End Sub
J'ai un probléme, car a priori j'ai écrit la meme chose sur deux userforms différents, il y en a un qui marche et l'autre erreur d'éxécution 13, incompatibilté de type. ESt ce que il y a quelque que je pourrai vérifier. merci
Celui la marche:
Private Sub UserForm_Activate()
TextBox1.Enabled = False
i = 3
If TextBox1.Value = "SIL9" Then
Do While Worksheets("Cu").Cells(3, i) <> ""
If IsNumeric(Worksheets("Cu").Cells(3, i).Value) Then
ListBox1.AddItem Worksheets("Cu").Cells(2, i).Value
End If
i = i + 1
Loop
End If
End Sub
Celui la marche pas:
Private Sub UserForm_Activate()
TextBox1.Enabled = False
i = 4
If TextBox1.Value = "SIL9" Then
Do While Worksheets("granulo").Cells(3, i) <> ""
If IsNumeric(Worksheets("granulo").Cells(3, i).Value) Then
ListBox1.AddItem Worksheets("granulo").Cells(2, i).Value
End If
i = i + 1
Loop
End If
End Sub
3 réponses
-
As-tu testé au pas à pas en vérifiant ce que contient tes variables ?
De plus, on ne va pas éplucher ligne par ligne ton code, alors si tu nous mettais la ligne qui cloche, tout le monde gagnerai du temps. -
Bonjour,
Private Sub UserForm_Activate()
TextBox1.Enabled = False
i = 4
If TextBox1.Value = "SIL9" Then
Do While Worksheets("granulo").Cells(3, i) <> "" ca s'arrete là
If IsNumeric(Worksheets("granulo").Cells(3, i).Value) Then
ListBox1.AddItem Worksheets("granulo").Cells(2, i).Value
End If
i = i + 1
Loop
End If
End Sub -