adkheir
XLDnaute Occasionnel
bonjour le forum
je suis souvent confronté a cette erreur "9" quelqu'un pourrait il m'éclaircir voici le code
Sub Test()
If ActiveCell <> "" And ActiveCell.Row > 2 Then
Mesval = Array("TextNom", "TextPrenom", "textGrade", "TextCCP", "TextCLE", "TextNbre")
MaLig = ActiveCell.Row
For i = 0 To UBound(Mesval)
ufnewcl.Controls(Mesval(i)).Text = Sheets("Liste").Cells(MaLig, i + 2)
Next
ufnewcl.CommandButton1.Visible = True
ufnewcl.Valid.Visible = False
ufnewcl.Show
Else
MsgBox "Selectionner une fiche !"
End If
End Sub
Sub EcritUSF(Arg1)
Mesval = Array("TextNom", "TextPrenom", "textgrade", "TextCCP", "TextCLE", "TextNbre")
For i = 0 To UBound(Mesval)
Sheets("Liste").Cells(Arg1, i + 2) = ufnewcl.Controls(Mesval(i)).Text
Next
Unload ufnewcl
End Sub
,
l'erreur est la d'après le débogage " gufnewcl.Controls(Mesval(i)).Text = Sheets("Liste").Cells(MaLig, i + 2) "
je suis souvent confronté a cette erreur "9" quelqu'un pourrait il m'éclaircir voici le code
Sub Test()
If ActiveCell <> "" And ActiveCell.Row > 2 Then
Mesval = Array("TextNom", "TextPrenom", "textGrade", "TextCCP", "TextCLE", "TextNbre")
MaLig = ActiveCell.Row
For i = 0 To UBound(Mesval)
ufnewcl.Controls(Mesval(i)).Text = Sheets("Liste").Cells(MaLig, i + 2)
Next
ufnewcl.CommandButton1.Visible = True
ufnewcl.Valid.Visible = False
ufnewcl.Show
Else
MsgBox "Selectionner une fiche !"
End If
End Sub
Sub EcritUSF(Arg1)
Mesval = Array("TextNom", "TextPrenom", "textgrade", "TextCCP", "TextCLE", "TextNbre")
For i = 0 To UBound(Mesval)
Sheets("Liste").Cells(Arg1, i + 2) = ufnewcl.Controls(Mesval(i)).Text
Next
Unload ufnewcl
End Sub
,
l'erreur est la d'après le débogage " gufnewcl.Controls(Mesval(i)).Text = Sheets("Liste").Cells(MaLig, i + 2) "