Sub SelectionColor()
Set ComDlg = CreateObject ( "MSComDlg.CommonDialog" )
Debut:
With ComDlg
.CancelError = True
.Color = RGB ( 255 , 0 , 0 )
.Flags = cdlCCFullOpen Or cdlCCRGBInit
' Appel de la boite couleur
On Error Resume Next
.ShowColor
If Err.Number <> cdlCancel Then
If MsgBox( "Vous n'avez pas sélectionné de couleur." & Chr ( 10 ) & "Voulez-vous annuler _
la sélection ?" , vbYesNo, TITRE) = vbYes Then
Exit Sub
Else
GoTo Debut
End If
End If
End With
ActiveCell.Interior.Color = ComDlg.Color
End Sub