Pour info, les "select" sont rarement utiles dans vba. tu aurais pu faire comme ceci :
Code:
With Sheets("gestion")
.Unprotect
With .Range("I11,I13,I15,I17,I19,I21,I23,I25,I27,I29,Q11,Q13,Q15,Q17,Q19,Q21,Q23,Q25,Q27,Q29").Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
.Range("F49:G49").ClearContents
End With
Sub auto_close() 'procedure de fermeture du programme
Application.DisplayAlerts = False
With Sheets("gestion")
.Unprotect
With .Range("I11,I13,I15,I17,I19,I21,I23,I25,I27,I29,Q11,Q13,Q15,Q17,Q19,Q21,Q23,Q25,Q27,Q29").Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
.Range("F49:G49").ClearContents
End With
le copier coller marche pas tres bien vu qu'il n'y a aucun espace sur les ranges
Sub auto_close() 'procedure de fermeture du programme
Application.DisplayAlerts = False
With Sheets("gestion")
.Unprotect
With .Range("I11,I13,I15,I17,I19,I21,I23,I25,I27,I29,Q11,Q13,Q15,Q17,Q19,Q21,Q23,Q25,Q27,Q29").Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
.Range("F49:G49").ClearContents
End With
Sub test_III()
'à adapter avec le bon nom de feuille
With Sheets(1)
.Unprotect
Application.ScreenUpdating = False
For i = 11 To 29 Step 2
With Union(.Range("I" & i), .Range("Q" & i))
.Interior.ColorIndex = 2
End With
Next
.Range("F49:G49").ClearContents
End With
Application.DisplayAlerts = False
Application.ScreenUpdating = True
ActiveWorkbook.Save
Application.Quit
End Sub