J'ai fait une procedure pour cacher certaines colonnes d'une feuille,
Sub Hide_Donor4()
Dim Range_A As Range, a As Integer
a = 0
For i = 1 To ActiveSheet.Columns.Count
If Cells(8, i).Value = "D4" And a = 0 Then
Set Range_A = Cells(8, i)
a = 1
End If
If Cells(8, i).Value = "D4" And a = 1 Then Set Range_A = Union(Range_A, Cells(8, i))
Next i
If Range_A.ColumnWidth = 0 Then Range_A.ColumnWidth = 14 Else Range_A.ColumnWidth = 0
End Sub
La procedure marche correctement mais quand le tableau est trop important (trop de lignes) la procedure bloque et me renvoie "erreur 400".
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.C
Bonjour. Quelle est la ligne en erreur ? Daniel
Bonjour,
J'ai fait une procedure pour cacher certaines colonnes d'une feuille,
Sub Hide_Donor4() Dim Range_A As Range, a As Integer a = 0 For i = 1 To ActiveSheet.Columns.Count If Cells(8, i).Value = "D4" And a = 0 Then Set Range_A = Cells(8, i) a = 1 End If If Cells(8, i).Value = "D4" And a = 1 Then Set Range_A = Union(Range_A, Cells(8, i)) Next i If Range_A.ColumnWidth = 0 Then Range_A.ColumnWidth = 14 Else Range_A.ColumnWidth = 0 End Sub
La procedure marche correctement mais quand le tableau est trop important (trop de lignes) la procedure bloque et me renvoie "erreur 400".
Y aurait il un moyen de passer outre ??
Grand merci par avance !
Bonjour.
Quelle est la ligne en erreur ?
Daniel
Bonjour,
J'ai fait une procedure pour cacher certaines colonnes d'une feuille,
Sub Hide_Donor4()
Dim Range_A As Range, a As Integer
a = 0
For i = 1 To ActiveSheet.Columns.Count
If Cells(8, i).Value = "D4" And a = 0 Then
Set Range_A = Cells(8, i)
a = 1
End If
If Cells(8, i).Value = "D4" And a = 1 Then Set Range_A =
Union(Range_A, Cells(8, i))
Next i
If Range_A.ColumnWidth = 0 Then Range_A.ColumnWidth = 14 Else
Range_A.ColumnWidth = 0
End Sub
La procedure marche correctement mais quand le tableau est trop important
(trop de lignes) la procedure bloque et me renvoie "erreur 400".
J'ai fait une procedure pour cacher certaines colonnes d'une feuille,
Sub Hide_Donor4() Dim Range_A As Range, a As Integer a = 0 For i = 1 To ActiveSheet.Columns.Count If Cells(8, i).Value = "D4" And a = 0 Then Set Range_A = Cells(8, i) a = 1 End If If Cells(8, i).Value = "D4" And a = 1 Then Set Range_A = Union(Range_A, Cells(8, i)) Next i If Range_A.ColumnWidth = 0 Then Range_A.ColumnWidth = 14 Else Range_A.ColumnWidth = 0 End Sub
La procedure marche correctement mais quand le tableau est trop important (trop de lignes) la procedure bloque et me renvoie "erreur 400".