View Single Post
 
Old 02-20-2020, 02:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Jennifer Murphy View Post
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?
Sorry, that really should have been:
Dim w As Long: w = RGB(255, 255, 255)
rather like you're using. To use 'Const w As Long =', one would have to use the actual RGB value, not the RGB function
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote