Erreur d'execution 424

cs_lea75 Messages postés 54 Date d'inscription vendredi 30 juillet 2004 Statut Membre Dernière intervention 28 août 2004 - 13 août 2004 à 17:06
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 - 13 août 2004 à 20:08
Bonjour à tous,

Quelqu'un pourrait me dire ce que veut dire l'erreur 424.
Il me dit qu'un objet est requis mais je ne vois pas mon erreur.

Voici mon code:
Public Sub MSFmembresaffiche()
Dim i As Integer
Dim j As Integer
Dim myobject As Variant
MSFlistmemb.Row = 0
With MSFlistmemb
.ColWidth(0) = 400
.col = 1
.Text = "Nom"
.col = 2
.Text = "Prenom"
.col = 3
.Text = "Rue"
.col = 4
.Text = "No Rue"
.col = 5
.Text = "Localité"
.col = 6
.Text = "Code Postal"
.col = 7
.Text = "Date de Naissance"
.col = 8
.Text = "Email"
.col = 9
.Text = "No cpte bancaire"
.col = 10
.Text = "Password"
.col = 11
.Text = "Login"
End With

i = 1

For Each myobject In Colmemb 'remplissage de la msflexgrid MSF par la collection colmemb // il me donne l'erreur ici
With MSFlistmemb
.Row = i
.col = 1
.Text = myobject.nommemb
.col = 2
.Text = myobject.prenommemb
.col = 3
.Text = myobject.ruememb
.col = 4
.Text = myobject.noruememb
.col = 5
.Text = myobject.localitememb
.col = 6
.Text = myobject.cpostalmemb
.col = 7
.Text = myobject.dnaissancememb
.col = 8
.Text = myobject.emailmemb
.col = 9
.Text = myobject.nocomptememb
.col = 10
.Text = myobject.pwdmemb
.col = 11
.Text = myobject.logmemb
.col = 12
.Text = myobject.idmemb
i = i + 1
.Row = i + 1
End With
Next myobject
MSFlistmemb.RemoveItem (i)
MSFlistmemb.col = 1
MSFlistmemb.Sort = 7
j = MSFlistmemb.ColWidth(0) + MSFlistmemb.ColWidth(1) + MSFlistmemb.ColWidth(2) + MSFlistmemb.ColWidth(3) + MSFlistmemb.ColWidth(4) + MSFlistmemb.ColWidth(5) + MSFlistmemb.ColWidth(6) + MSFlistmemb.ColWidth(7) + MSFlistmemb.ColWidth(8) + MSFlistmemb.ColWidth(9) + MSFlistmemb.ColWidth(10) + MSFlistmemb.ColWidth(11)
MSFlistmemb.Width = j

End Sub

3 réponses

bilaloch Messages postés 556 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 31 octobre 2019 1
13 août 2004 à 17:26
c'est simple. je pense que myobject est requit.c'est une idé seulement.
@plus
0
cs_lea75 Messages postés 54 Date d'inscription vendredi 30 juillet 2004 Statut Membre Dernière intervention 28 août 2004
13 août 2004 à 17:47
Mais je ne comprends pas, je suis désolée mais je suis débutante et je ne comprends pas pourquoi il n'accepte pas myobject alors que je le déclare et je le remplis après.

Merci pour vos réponses, je suis perdue!
0
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
13 août 2004 à 20:08
essai:
For Each myobject In Colmemb
blablabla
.Text = Colmemb.nommemb
blablabla
.Text = Colmemb.prenommemb
etc... en remplacant tous les myobject. par Colmemb.

Daniel
0
Rejoignez-nous