View Single Post
 
Old 02-20-2020, 06:03 AM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Windows XP Office 2007
Competent Performer
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
So why not simply pass the RGB value as a long? That's what the code in https://www.msofficeforums.com/148862-post9.html does via:
Const w As Long = RGB(255, 255, 255)
[/CODE]
When I saw this example, I was excited to be able to simplify the macro, but a little embarrassed that I missed it in the other thread. I never knew you could put an expression with a function call in a Const statement. But when I tried it, I got an error that it was an invalid statement. Does it really work?

I was able to get something almost as good to work.
Code:
Dim Blue As Long: Blue = RGB(219, 229, 241)
Dim White As Long: White = RGB(255, 255, 255)
Thank you very much
Reply With Quote