Dim Mois, Année, jour
Private Sub ComboBox1_Change()
MesJours
End Sub
Private Sub ComboBox2_Change()
MesJours
End Sub
Private Sub Worksheet_Activate()
ComboBox1.List = Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre")
ComboBox2.List = Array(2019, 2020, 2021, 2022, 2023, 2025, 2026, 2027, 2028, 2029, 2030)
End Sub
Sub MesJours()
Année = ComboBox2: Mois = ComboBox1
On Error Resume Next
jour = CDate("1-" & Mois & "-" & Année)
Application.ScreenUpdating = 0
Application.EnableEvents = False: [C10] = jour
Columns(31).Hidden = Month([AE10]) > Month([C10])
Columns(32).Hidden = Month([AF10]) > Month([C10])
Columns(33).Hidden = Month([AG10]) > Month([C10])
Application.EnableEvents = True
End Sub