Live-Forum - Die aktuellen Beiträge
Datum
Titel
29.03.2024 13:14:12
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
924to928
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
924to928
924to928
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

RGB-Farbe eintragen ?

RGB-Farbe eintragen ?
15.11.2007 15:12:00
Selma
Hallo leute,
ich habe in Spalte A ab Zeile 2 die Zellen mit Füllfarbe dargestellt. Wie kann ich in Spalte B, C, und D die RGB-Werte von Füllfarbe eintragen?
Vielen Dank im Voraus.
Liebe Grüße
Selma

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: RGB-Farbe eintragen ?
15.11.2007 15:22:59
Hajo_Zi
Hallo Selma,

Sub RGBAnzeige()
'   auf Grundlage von einem Code von Nepumuk
Dim Rot As Long, Grün As Long, Blau As Long, Wert As Long
' ****** Ergänzung Hajo
Dim i As Integer
For i = 2 To 57
'       Farbe in Spalte A
Cells(i, 1).Interior.ColorIndex = i
Wert = Cells(i, 1).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 & ", " & Grün & ", " & Blau
' ***** Ergänzung Hajo
Cells(i, 3) = Rot
Cells(i, 4) = Grün
Cells(i, 5) = Blau
Next i
'***** Ergänzung Hajo
Cells(58, 3) = "Rot"
Cells(58, 4) = "Grün"
Cells(58, 5) = "Blau"
Cells(58, 3) = "RGB Farbwerte"
End Sub



Anzeige
AW: RGB-Farbe eintragen ?
15.11.2007 16:14:00
Selma
Vielen Dank Hajo.
LG
Selma

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige