Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

masquer un maximum de donnees

1 réponse
Avatar
msavel
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 !

1 réponse

Avatar
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 !