Converting Long Integers to Hexadecimal or RGB Values

Okay guys, this is it :) Plain and simple

The following code converts a Decimal Value to a Hexadecimal value, then takes the 3 RGB elements of the Hex number and converts them back into their 8-bit integers. It's not hard, 5 easy lines :)

Dim HexadecimalValue As String 'This will store the Hexadecimal Value as a string
Dim RedValue As Integer 'This will store the integer Red value (value of 0 to 255)
Dim GreenValue As Integer 'This will store the integer Greenvalue (value of 0 to 255)
Dim BlueValue As Integer 'This will store the integer Blue value (value of 0 to 255)

Public Sub Decimal_to_RGB (DecimalValue As Long)

End Sub

That's all there is to it.

Tutorial by Steven Blom

Special thanks to:
Chris, KoPP3x, Martin on Lucky's VB Gaming Message Board
(I remembered your discussion, but I didn't refer to it to write this.)