deze code werkt wel
Sub Excel_VBA_Get_RGB_Color_Of_Cell()
Dim cColor, cRed, cGreen, cBlue
'Get Cell background color VBA Value. Convert this Color Value to RGB Value
cColor = ActiveSheet.Cells(1, 1).Interior.Color
'Convert Color Code to RGB
cRed = (cColor Mod 256)
cGreen = (cColor \ 256) Mod 256
cBlue = (cColor \ 65536) Mod 256
MsgBox cColor & "; " & VBA.RGB(cRed, cGreen, cBlue)
RGBcode = VBA.RGB(cRed, cGreen, cBlue)
Cells(3, 2).Interior.Color = RGBcode