ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   BackColor property code (https://www.excelbanter.com/excel-programming/284819-backcolor-property-code.html)

Joe Mathis

BackColor property code
 
Hello,

Can someone please tell me what the code would be to set/change hte BackColor property of a textbox on a user form. I would like to be able to change the BackColor shade depending on other certain criteria to indicate a non-editable entry.

Thank You,

Joe Mathis

pikus

BackColor property code
 

A row would be handled like this:

With Rows(x).Interior.ColorIndex = 6

The number 6 = Yellow

Colorindex Property in VBA Help will help you with the othe
colors/numbers

-Piku

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements

Bob Phillips[_6_]

BackColor property code
 
Joe,

Something like

Me.TextBox1.BackColor = RGB(123, 123, 255)

Gord Dibben also advised of this little utility to get RGB colour codes

http://no-nonsense-software.com/freeware/

RGBtoHEX 1.1a


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Joe Mathis" wrote in message
...
Hello,

Can someone please tell me what the code would be to set/change hte

BackColor property of a textbox on a user form. I would like to be able to
change the BackColor shade depending on other certain criteria to indicate a
non-editable entry.

Thank You,

Joe Mathis




Joe Mathis

BackColor property code
 
Thank you, Bob.

This woks as needed.

Joe

----- Bob Phillips wrote: -----

Joe,

Something like

Me.TextBox1.BackColor = RGB(123, 123, 255)

Gord Dibben also advised of this little utility to get RGB colour codes

http://no-nonsense-software.com/freeware/

RGBtoHEX 1.1a


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Joe Mathis" wrote in message
...
Hello,
Can someone please tell me what the code would be to set/change hte

BackColor property of a textbox on a user form. I would like to be able to
change the BackColor shade depending on other certain criteria to indicate a
non-editable entry.
Thank You,
Joe Mathis






All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com