BackColor property code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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 said:
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, 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 said:
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.
 
Back
Top