Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Daniel
Bonsoir. Exit For te conduit à la première instruction après le Next, soit End Sub. Cordialement. Daniel "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Bonsoir.
Exit For te conduit à la première instruction après le Next, soit End Sub.
Cordialement.
Daniel
"Franck" <Franck03@hotmail.com> a écrit dans le message de news:
O6gdM42JGHA.648@TK2MSFTNGP14.phx.gbl...
Bonjour a tous,
j'ai le codage suivant
Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Bonsoir. Exit For te conduit à la première instruction après le Next, soit End Sub. Cordialement. Daniel "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Franck
Bonsoir Daniel ouais je ses qu'il me conduit a sa mais le probleme ses que If ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma cellule active. il en fait seulement 3 a chaque fois :( il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a la troisieme fois qu'il passe par dessus next WS il descent a end sub il remonte meme pas au debut de for each ws......
merci "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Bonsoir Daniel
ouais je ses qu'il me conduit a sa mais le probleme ses que If
ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma cellule
active.
il en fait seulement 3 a chaque fois :(
il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a la
troisieme fois qu'il passe par dessus next WS il descent a end sub il
remonte meme pas au debut de for each ws......
merci
"Franck" <Franck03@hotmail.com> a écrit dans le message de news:
O6gdM42JGHA.648@TK2MSFTNGP14.phx.gbl...
Bonjour a tous,
j'ai le codage suivant
Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Bonsoir Daniel ouais je ses qu'il me conduit a sa mais le probleme ses que If ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma cellule active. il en fait seulement 3 a chaque fois :( il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a la troisieme fois qu'il passe par dessus next WS il descent a end sub il remonte meme pas au debut de for each ws......
merci "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Daniel
Vérifie quand même que tu es bien sur la bonne feuille. A ta place, j'ajouterais : msgbox WS.Name après For each... Histoire d'être sûr. Cordialement. Daniel "Franck" a écrit dans le message de news: %
Bonsoir Daniel ouais je ses qu'il me conduit a sa mais le probleme ses que If ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma cellule active. il en fait seulement 3 a chaque fois :( il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a la troisieme fois qu'il passe par dessus next WS il descent a end sub il remonte meme pas au debut de for each ws......
merci "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Vérifie quand même que tu es bien sur la bonne feuille. A ta place,
j'ajouterais :
msgbox WS.Name
après For each...
Histoire d'être sûr.
Cordialement.
Daniel
"Franck" <Franck03@hotmail.com> a écrit dans le message de news:
%23mPxja3JGHA.3876@TK2MSFTNGP11.phx.gbl...
Bonsoir Daniel
ouais je ses qu'il me conduit a sa mais le probleme ses que If
ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma
cellule
active.
il en fait seulement 3 a chaque fois :(
il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a
la
troisieme fois qu'il passe par dessus next WS il descent a end sub il
remonte meme pas au debut de for each ws......
merci
"Franck" <Franck03@hotmail.com> a écrit dans le message de news:
O6gdM42JGHA.648@TK2MSFTNGP14.phx.gbl...
Bonjour a tous,
j'ai le codage suivant
Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Vérifie quand même que tu es bien sur la bonne feuille. A ta place, j'ajouterais : msgbox WS.Name après For each... Histoire d'être sûr. Cordialement. Daniel "Franck" a écrit dans le message de news: %
Bonsoir Daniel ouais je ses qu'il me conduit a sa mais le probleme ses que If ActiveCell.FormulaR1C1 = "" et bien il y a de quoi d'écrit dans ma cellule active. il en fait seulement 3 a chaque fois :( il ne depasse jamais 3 boucle .... si je vais un pas a pas (f8) et bien a la troisieme fois qu'il passe par dessus next WS il descent a end sub il remonte meme pas au debut de for each ws......
merci "Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Lionel
Bonsoir Franck,
Sans plus chercher à savoir ce que tu souhaites faire avec ce code, je dirais que tu ne travailles qu'avec les cellules de ta feuille active. Est-ce vraiment ce que tu as voulu coder ? Car en aucun cas des cellules de la feuille WS ne sont utilisées (???).
Amicalement Lionel
"Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Bonsoir Franck,
Sans plus chercher à savoir ce que tu souhaites faire avec ce code, je
dirais que tu ne travailles qu'avec les cellules de ta feuille active.
Est-ce vraiment ce que tu as voulu coder ? Car en aucun cas des cellules de
la feuille WS ne sont utilisées (???).
Amicalement
Lionel
"Franck" <Franck03@hotmail.com> a écrit dans le message de
news:O6gdM42JGHA.648@TK2MSFTNGP14.phx.gbl...
Bonjour a tous,
j'ai le codage suivant
Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Sans plus chercher à savoir ce que tu souhaites faire avec ce code, je dirais que tu ne travailles qu'avec les cellules de ta feuille active. Est-ce vraiment ce que tu as voulu coder ? Car en aucun cas des cellules de la feuille WS ne sont utilisées (???).
Amicalement Lionel
"Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Franck
Bonjour a tous, bons j'ai regler mon probleme je ses pas pk j'avais mit
Dim WS As Worksheet For Each WS In Worksheets
au lieu de
Dim c As Range For Each c In Range("A14", "F400")
j'etait dans les patate hier Merci a tout pour votre aide :)
"Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent
Merci de votre attention
Bonjour a tous,
bons j'ai regler mon probleme je ses pas pk j'avais mit
Dim WS As Worksheet
For Each WS In Worksheets
au lieu de
Dim c As Range
For Each c In Range("A14", "F400")
j'etait dans les patate hier
Merci a tout pour votre aide :)
"Franck" <Franck03@hotmail.com> a écrit dans le message de news:
O6gdM42JGHA.648@TK2MSFTNGP14.phx.gbl...
Bonjour a tous,
j'ai le codage suivant
Range("A16").Select
Dim WS As Worksheet
For Each WS In Worksheets
If ActiveCell.FormulaR1C1 = "" Then Exit For
ActiveCell.Offset(0, 3).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(2, -5).Select
Next WS
End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute
automatiquement a mon end sub il ne recommence meme pas au début !
pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses
d'écrite dans mes cellules qui suivent
Bonjour a tous, bons j'ai regler mon probleme je ses pas pk j'avais mit
Dim WS As Worksheet For Each WS In Worksheets
au lieu de
Dim c As Range For Each c In Range("A14", "F400")
j'etait dans les patate hier Merci a tout pour votre aide :)
"Franck" a écrit dans le message de news:
Bonjour a tous, j'ai le codage suivant
Range("A16").Select Dim WS As Worksheet For Each WS In Worksheets If ActiveCell.FormulaR1C1 = "" Then Exit For ActiveCell.Offset(0, 3).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With
ActiveCell.Offset(0, 2).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With ActiveCell.Offset(2, -5).Select Next WS End Sub
Quelqu'un ses pk quand il arrive a son troisieme Next WS il saute automatiquement a mon end sub il ne recommence meme pas au début ! pourtant il devrait continuer 5 a 6 fois, car j'ai encord des choses d'écrite dans mes cellules qui suivent