Excel: Change background color of a cell to RGB color written in that cell
问题 I have this code which shows rgb color of target cell: Function getRGB(RefCell) Dim mystr As String Application.Volatile mystr = Right("000000" & Hex(RefCell.Interior.Color), 6) getRGB = Application.Hex2Dec(Right(mystr, 2)) & ", " & _ Application.Hex2Dec(Mid(mystr, 3, 2)) & ", " & _ Application.Hex2Dec(Left(mystr, 2)) End Function I need that this code instead of showing off rgb of other cell, would change background color of its own cell. Maybe anyone know how to do it? 回答1: The MSDN KB says