'This function converts a color (long value) to a RGB String. Public Function getRGB(RGBLong As Long) As String Dim intRed As Integer Dim intGreen As Integer Dim intBlue As Integer Dim strHexVal As String Dim strOneSet As String strHexVal = CStr(Hex(RGBLong)) 'fix the length of the colour value Do While Len(strHexVal) < 6 strHexVal = "0" & strHexVal Loop strOneSet = Mid(strHexVal, 5, 2) intRed = CLng("&h" & strOneSet) strOneSet = Mid(strHexVal, 3, 2) intGreen = CLng("&h" & strOneSet) strOneSet = Mid(strHexVal, 1, 2) intBlue = CLng("&h" & strOneSet) getRGB = "RGB(" & intRed & "," & intGreen & "," & intBlue & ")" End Function