Next sans for VBA Excel
Fermé
guillaumegh
Messages postés
7
Date d'inscription
mardi 12 octobre 2010
Statut
Membre
Dernière intervention
14 mars 2012
-
14 mars 2012 à 11:37
eriiic Messages postés 24603 Date d'inscription mardi 11 septembre 2007 Statut Contributeur Dernière intervention 15 décembre 2024 - 14 mars 2012 à 22:34
eriiic Messages postés 24603 Date d'inscription mardi 11 septembre 2007 Statut Contributeur Dernière intervention 15 décembre 2024 - 14 mars 2012 à 22:34
A voir également:
- Vba next sans for
- Downloader for pc - Télécharger - Téléchargement & Transfert
- L'indice n'appartient pas à la sélection vba - Forum VB / VBA
- Incompatibilité de type vba ✓ - Forum Programmation
- Instagram for pc - Télécharger - Divers Communication
- Idm for mac - Télécharger - Téléchargement & Transfert
5 réponses
pijaku
Messages postés
12263
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
4 janvier 2024
2 758
14 mars 2012 à 11:45
14 mars 2012 à 11:45
Bonjour,
C'est pas forcément un For ou un next qui manque. Cela peut être un End If....
Mais comme ton code est illisible, à toi de trouver.
Petit conseil toutefois, Indente ton code.
Exemple non indenté :
même exemple indenté :
Ok?
Sinon, dans ton code :
Doukilé le End If de If en gras???
C'est pas forcément un For ou un next qui manque. Cela peut être un End If....
Mais comme ton code est illisible, à toi de trouver.
Petit conseil toutefois, Indente ton code.
Exemple non indenté :
For i = 1 to 18 For j = 3 to 5 If cells(i, 1) = 3 Then Cells(i, j) = "AB" Else Cells(i, j) = "ZE" End If nextj next i
même exemple indenté :
For i = 1 to 18 For j = 3 to 5 If cells(i, 1) = 3 Then Cells(i, j) = "AB" Else Cells(i, j) = "ZE" End If nextj next i
Ok?
Sinon, dans ton code :
For l = 1 To 345 fichier = Sheets("Feuil1").Cells(l, 2).Value If fichier <> "" And Cells(l, 3).Value <> "" Then 'bla bla bla Next j Next i Windows("Type de formalisme.xls").Activate Windows(fichier).Activate ActiveWindow.Close 'ferme le fichier Next l
Doukilé le End If de If en gras???