Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
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
isabelle
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
Daniel
Bonsoir. C'est plus court, mais est-ce plus rapide ?
With Union(Range("AO100").End(xlUp), Range("AP100").End(xlUp), _ Range("AQ100").End(xlUp), Range("AR100").End(xlUp)) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
Cordialement. Daniel "Denys" a écrit dans le message de news:
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
Bonsoir.
C'est plus court, mais est-ce plus rapide ?
With Union(Range("AO100").End(xlUp), Range("AP100").End(xlUp), _
Range("AQ100").End(xlUp), Range("AR100").End(xlUp))
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
Cordialement.
Daniel
"Denys" <Denys@discussions.microsoft.com> a écrit dans le message de news:
02DD668C-25FC-4AE9-BB0F-30F9BDA91E8F@microsoft.com...
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
Bonsoir. C'est plus court, mais est-ce plus rapide ?
With Union(Range("AO100").End(xlUp), Range("AP100").End(xlUp), _ Range("AQ100").End(xlUp), Range("AR100").End(xlUp)) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
Cordialement. Daniel "Denys" a écrit dans le message de news:
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
Denys
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
isabelle
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
Sub BorduresV()
With ActiveSheet
.Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With
End Sub
isabelle
correction,
Sub BorduresV() With ActiveSheet x = .Range("AO100").End(xlUp).Row For Each c In .Range("AO" & x & ":AR" & x) c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin Next End With End Sub
isabelle
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
correction,
Sub BorduresV()
With ActiveSheet
x = .Range("AO100").End(xlUp).Row
For Each c In .Range("AO" & x & ":AR" & x)
c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
Next
End With
End Sub
isabelle
Sub BorduresV()
With ActiveSheet
.Range("AO" & .Range("AO100").End(xlUp) & ":AR" &
.Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic,
Weight:=xlThin
End With
End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
End Sub
Sub BorduresV() With ActiveSheet x = .Range("AO100").End(xlUp).Row For Each c In .Range("AO" & x & ":AR" & x) c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin Next End With End Sub
isabelle
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
Denys
Bonjour Isabelle et Daniel,
Merci beaucoup... Tout est parfait.
Bonne journée
Denys
correction,
Sub BorduresV() With ActiveSheet x = .Range("AO100").End(xlUp).Row For Each c In .Range("AO" & x & ":AR" & x) c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin Next End With End Sub
isabelle
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
Bonjour Isabelle et Daniel,
Merci beaucoup... Tout est parfait.
Bonne journée
Denys
correction,
Sub BorduresV()
With ActiveSheet
x = .Range("AO100").End(xlUp).Row
For Each c In .Range("AO" & x & ":AR" & x)
c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
Next
End With
End Sub
isabelle
Sub BorduresV()
With ActiveSheet
.Range("AO" & .Range("AO100").End(xlUp) & ":AR" &
.Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic,
Weight:=xlThin
End With
End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV()
With ActiveSheet.Range("AO100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AP100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AQ100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
With ActiveSheet.Range("AR100").End(xlUp)
.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin
End With
End Sub
Sub BorduresV() With ActiveSheet x = .Range("AO100").End(xlUp).Row For Each c In .Range("AO" & x & ":AR" & x) c.BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin Next End With End Sub
isabelle
Sub BorduresV() With ActiveSheet .Range("AO" & .Range("AO100").End(xlUp) & ":AR" & .Range("AO100").End(xlUp)).BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub
isabelle
Bonjour Isabelle,
Oui, le résultat est le même.
Merci
Denys
bonjour Denys,
le résultat du .End(xlUp) est il la même ligne pour les 4 colonnes ?
isabelle
Bonjour à tous,
Auriez-vous le moyen de raccourcir les instructions suivantes ?
Sub BorduresV() With ActiveSheet.Range("AO100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AP100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AQ100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With With ActiveSheet.Range("AR100").End(xlUp) .BorderAround ColorIndex:=xlAutomatic, Weight:=xlThin End With End Sub