Boostez vos compétences Excel avec notre communauté !
Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !
Private Sub ComboBox1_Change()
Dim intNbFiltre As Integer, intNBFiltreCount As Integer
With UserForm1
Select Case .ComboBox1.Value
Case 'Sociétés'
.ListBox1.RowSource = 'Liste!A1:B' & Worksheets('Liste').Cells(65536, 1).End(xlUp).Row
.Height = 277.5
Case 'Catégories (% act. oblig. cash)'
.ListBox1.RowSource = 'Liste!E1:F' & Worksheets('Liste').Cells(65536, 5).End(xlUp).Row
.Height = 277.5
Case 'Catégories'
.ListBox1.RowSource = 'Liste!E1:F' & Worksheets('Liste').Cells(65536, 5).End(xlUp).Row
.Height = 277.5
Case 'Promoteurs'
.ListBox1.RowSource = 'Liste!C1😀' & Worksheets('Liste').Cells(65536, 3).End(xlUp).Row
.Height = 277.5
Case 'PEA', 'Skandia'
.ListBox1.RowSource = ''
.Height = 115
End Select
Sheets(.ComboBox1.Value).Select
Select Case .ComboBox1.Value
Case 'Sociétés', 'Promoteurs'
intNBFiltreCount = 3
Case Else
intNBFiltreCount = 2
End Select
For intNbFiltre = 1 To intNBFiltreCount
Selection.AutoFilter Field:=intNbFiltre
Next intNbFiltre
End With
End Sub
Je tien a repréciser, que ce n'est pas parfait pour les couleur. En ce sens que le formatage des
couleur est appeler que par l'action du trie des données. Je ne sais pas si tu comprend ce que je
veux dire ?
'Création du format des bordures de lignes
If IntLigneFin <> 8 Then
With Range(Cells(8, intColonneDépart), Cells(IntLigneFin, intColonneFin))
With .Borders '(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
.Borders(xlInsideVertical).LineStyle = xlNone
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
End With
End If
Private Sub ComboBox1_Change()
Dim intNbFiltre As Integer, intNBFiltreCount As Integer
With UserForm1
Select Case .ComboBox1.Value
Case 'Sociétés'
.ListBox1.RowSource =
\\'Liste!A1:B\\' & Worksheets(\\'Liste\\').Cells(65536, 1).End(xlUp).Row
.Height = 277.5
Case 'Catégories (% act. oblig. cash)'
.ListBox1.RowSource =
\\'Liste!E1:F\\' & Worksheets(\\'Liste\\').Cells(65536, 5).End(xlUp).Row
.Height = 277.5
Case 'Catégories'
.ListBox1.RowSource =
\\'Liste!E1:F\\' & Worksheets(\\'Liste\\').Cells(65536, 5).End(xlUp).Row
.Height = 277.5
Case 'Promoteurs'
.ListBox1.RowSource =
\\'Liste!C1😀\\' & Worksheets(\\'Liste\\').Cells(65536, 3).End(xlUp).Row
.Height = 277.5
Case 'PEA', 'Skandia'
.ListBox1.RowSource = ''
.Height = 115
End Select
Sheets(.ComboBox1.Value).Select
Select Case .ComboBox1.Value
Case 'Sociétés', 'Promoteurs'
intNBFiltreCount = 3
Case Else
intNBFiltreCount = 2
End Select
For intNbFiltre = 1 To intNBFiltreCount
Selection.AutoFilter Field:=intNbFiltre
Next intNbFiltre
End With
End Sub
We use cookies and similar technologies for the following purposes:
Est ce que vous acceptez les cookies et ces technologies?
We use cookies and similar technologies for the following purposes:
Est ce que vous acceptez les cookies et ces technologies?