Bonjour,
Comment modifier ce programme VBA pour qu'il s'applique a tous un classeur. D'avance merci.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Range
For Each X In Range("A1:BB62")
If X.Value = "RH" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "CA" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "FR" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "HS" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "JU" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RTT" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "CT" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "AN" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "MED" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RV" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "EF" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RF" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RTP" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "MAL" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "AC" Then X.Cells.Interior.ColorIndex = 15
Next X
End Sub
Comment modifier ce programme VBA pour qu'il s'applique a tous un classeur. D'avance merci.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Range
For Each X In Range("A1:BB62")
If X.Value = "RH" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "CA" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "FR" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "HS" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "JU" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RTT" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "CT" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "AN" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "MED" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RV" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "EF" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RF" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "RTP" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "MAL" Then X.Cells.Interior.ColorIndex = 15
If X.Value = "AC" Then X.Cells.Interior.ColorIndex = 15
Next X
End Sub