Public Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long 'OK Public Function OleColorToRGB(ByVal Color As OLE_COLOR) As Long If Color And &H80000000 Then OleColorToRGB = GetSysColor(Color Xor &H80000000) Else OleColorToRGB = Color End If End Function
dim hexa as string dim color as long '.... '.... Hexa = hex$(color) 'et inversement color = val ( "&h" & hex & "&" )
MaCouleur = OLEColorToRGB ( &h80000010 )