cs_lea75
Messages postés54Date d'inscriptionvendredi 30 juillet 2004StatutMembreDernière intervention28 août 2004
-
13 août 2004 à 17:06
Gobillot
Messages postés3140Date d'inscriptionvendredi 14 mai 2004StatutMembreDernière intervention11 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
cs_lea75
Messages postés54Date d'inscriptionvendredi 30 juillet 2004StatutMembreDernière intervention28 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.
Gobillot
Messages postés3140Date d'inscriptionvendredi 14 mai 2004StatutMembreDernière intervention11 mars 201934 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.