Something like this should work...

Code:
Dim myHexValue As String
 myHexValue = Hex(RGB(255, 0, 0))
 myHexValue = myHexValue & String(6 - Len(myHexValue), "0")
 myHexValue = "#" & myHexValue
 Debug.Print myHexValue