Private Sub ComboBox1_Change()
Dim N As Range
For Each N In [B2:B1000] '1000 ou dernière ligne
If Month(N) = ComboBox1.ListIndex + 1 Then Application.Goto (Cells(N.Row, 1)), True: Cells(N.Row, 1).Select: Exit For
Next
End Sub
Ton code de départ utilisais Application.Goto, et il n'était nulle part question de masquer/démasquer ...Peut-être me fais-je mal comprendre, selon la sélection du mois, je souhaite que seules les lignes afférentes à ce mois soient visibles.
Private Sub ComboBox1_Change()
Dim I As Integer
Application.ScreenUpdating = False
On Error Resume Next
For I = 1 To [COUNTA($B:$B)]
If Range("B" & I) = "" Or Month(Range("B" & I)) = ComboBox1.ListIndex + 1 Then Rows(I).Hidden = False Else Rows(I).Hidden = True
Next
On Error GoTo 0
Application.ScreenUpdating = False
End Sub
Private Sub ComboBox1_Change()
Dim I As Integer
Application.ScreenUpdating = False
On Error Resume Next
For I = 1 To [COUNTA($B:$B)]
If ComboBox1.Text = "Tout" Then
Rows(I).Hidden = False
Else
If Range("B" & I) = "" Or Month(Range("B" & I)) = ComboBox1.ListIndex Then Rows(I).Hidden = False Else Rows(I).Hidden = True
End If
Next
On Error GoTo 0
Application.ScreenUpdating = False
End Sub