I found this code on the forum a little time ago. It converts VB colours to HTML Colours (some kind of Hexadecimal value). Unfortunately I don't really understand its functionality, and I need a code that does the opposite: convert HTML Colours to VB Colours. Does anyone have such a code?

Thanks.

VB Code:
  1. Public Function ForeColorHTML(Number As Long) As String
  2. Dim MyString As String, MyNum As Long, MyCalc As Long, MyRemainder As Long, X As Integer
  3. MyRemainder = Number
  4.     MyString = ""
  5.     For X = 2 To 0 Step -1
  6.         MyCalc = MyRemainder \ 256 ^ X
  7.         MyString = Format$(Hex(MyCalc), "00") & MyString
  8.         MyRemainder = MyRemainder - MyCalc * 256 ^ X
  9.     Next
  10.     txtForeColor.Text = MyString
  11. End Function