Convert Color.RGB to hexadecimal value

J

John

Hi!

I want to convert the value of color.RGB of font object to hexadecimal
value.
How is it possible. Can some one help me.

John
 
J

John

You have got me wrong, I need to convert it within PPT my code and not from
any 3rd party tool.

John
 
S

Shyam Pillai

John,
' ----------------------------------
Dim Rvalue As Integer
Dim Gvalue As Integer
Dim Bvalue As Integer
Dim RGBvalue As Long

RGBvalue = RGB(255, 255, 255)

Rvalue = RGBvalue Mod 256
Gvalue = RGBvalue \ 256 Mod 256
Bvalue = RGBvalue \ 65536 Mod 256

Debug.Print RGBvalue, Rvalue, Gvalue, Bvalue
' ----------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top