Jumat, 29 November 2013

RE: [MS_AccessPros] VBA Color

 

Glad to help.

 

By the way, #C67171 is RGB(198, 113, 113)

 

(&HC6 = 191, etc.)

 

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

 

 

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bryan
Sent: Friday, November 29, 2013 1:10 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] VBA Color

 




John,

Thanks for the help.

 

B

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John Viescas
Sent: Thursday, November 28, 2013 10:10 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] VBA Color

 

 

Bryan-

 

The easiest thing to do is use the RGB function.

 

RGB(0, 0, 0) = black

RGB(255, 0, 0) = red

RGB(0, 255, 0) = green

RGB(0, 0, 255) = blue

RGB(255, 255, 255) = white

 

Me.Control.Backcolor = RGB( x, y, z)

 

You can get the values by looking up the color you want in the color picker.

 

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

 

 

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bryan
Sent: Thursday, November 28, 2013 3:49 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] VBA Color

 





Hello – have another question that I cannot find a clear answer on the web…..

In VBA, the color code is different than what is in the property box (ie property box color = #C67171 and vba = 7434694)

Is there a “simple” way to just use the property color when setting the backcolor or forecolor in VBA without doing a web search for a converter program each time?

I did find the sample:

Me!Control.Backcolor = Val("&H" & "FFFFFF")

But cannot get it to work

Thanks,

B





 




__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar