Dim WithEvents Excel As Application
Private Sub UserForm_Initialize()
Set Excel = Application
CommandButton_couleur_Click
End Sub
Private Sub CommandButton_couleur_Click()
Randomize
CommandButton_couleur.BackColor = RGB(Int(255 * Rnd) + 1, Int(255 * Rnd) + 1, Int(255 * Rnd) + 1)
End Sub
Private Sub Excel_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Target.Interior.Color = CommandButton_couleur.BackColor
End Sub