MsgBox Rot & ", " & Grün & ", " & Blau
Es wäre auh noch toll, wenn der Code dann in der Nebenzelle der aktiven Zelle eingefügt würde. Dies wäre aber nur noch ein Plus.
Sub RGBAnzeige()
Dim Rot As Long, Grün As Long, Blau As Long, Wert As Long
Wert = ActiveCell.Interior.Color
On Error Resume Next
Rot = Wert Mod 256
Wert = (Wert - Rot) / 256
Grün = Wert Mod 256
Wert = (Wert - Grün) / 256
Blau = Wert Mod 256
MsgBox "Rot " & Rot & "," & "Grün " & Grün & ", " & "Blau " & Blau
End Sub
MsgBox Rot & ", " & Grün & ", " & Blau
Es wäre auh noch toll, wenn der Code dann in der Nebenzelle der aktiven Zelle eingefügt würde. Dies wäre aber nur noch ein Plus.
Sub RGBAnzeige()
Dim Rot As Long, Grün As Long, Blau As Long, Wert As Long
Wert = ActiveCell.Interior.Color
On Error Resume Next
Rot = Wert Mod 256
Wert = (Wert - Rot) / 256
Grün = Wert Mod 256
Wert = (Wert - Grün) / 256
Blau = Wert Mod 256
MsgBox "Rot " & Rot & "," & "Grün " & Grün & ", " & "Blau " & Blau
End Sub