Re: custom cell color

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi

The only problem with this approach is that Excel treats RGB as a
request which it is able to satisfy in only 56 ways.

Try:

Sub Hmm()
Dim R As Long, G As Long, B As Long
R = 153
G = 204
B = 255
Range("A1").Interior.Color = RGB(R, G, B) 'Colorindex 37
MsgBox RGB(R, G, B) & " vs. " & Range("A1").Interior.Color
R = 154
G = 205
B = 254
MsgBox RGB(R, G, B) & " vs. " & Range("A1").Interior.Color
End Sub

You'll see that the 2 numbers are the same in the first message box but
differ in the second. If you want it to satisfy a custom request you
have to teach it how to by modifying its palette.

-John Coleman

RichardSchollar wrote:
Mark

Range("A1").Interior.Color = RGB(255,0,0)

adjust RGB value to suit.

Best regards

Richard


--
RichardSchollar
------------------------------------------------------------------------
RichardSchollar's Profile: http://www.officehelp.in/member.php?userid=5248
View this thread: http://www.officehelp.in/showthread.php?t=1275010

Posted from - http://www.officehelp.in

.



Relevant Pages

  • Re: Chat client/server print failed
    ... is the print statement in the send_msg_all sub. ... leave the server running for testing purposes. ... # This would be the end of file, so close the client ... # just read means there is a complete request waiting ...
    (comp.lang.perl.misc)
  • Chat client/server print failed
    ... This is a chat client wrote in perl Gtk2. ... is the print statement in the send_msg_all sub. ... leave the server running for testing purposes. ... # just read means there is a complete request waiting ...
    (comp.lang.perl.misc)
  • Re: The Vinland Maps Ink
    ... > they satisfy my request for "a hypothesis which makes ... > your prediction. ... > example that would satisfy you. ... Evol. ...
    (sci.archaeology)
  • Re: Asynchronous HttpWebRequest
    ... > your approach will not work with a web app. ... later on the request ... > | async request works fine and I get a proper response. ... > | End Sub ...
    (microsoft.public.dotnet.framework.aspnet)
  • iptables logfile parsing tool
    ... I'm using this perl tool to scan my logfiles each night. ... sub generate_summary ... -key key search key for firewall logs. ...
    (comp.os.linux.networking)