Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to count cells in a range with a given backcolor? David Excel Worksheet Functions 11 October 17th 07 04:03 PM
Windows Visible Property - Code Help Gerry O Excel Discussion (Misc queries) 2 September 6th 07 02:44 AM
VBA Code For OR-Function Using Cell Property kylie Excel Discussion (Misc queries) 1 June 20th 06 02:42 AM
Worksheet backcolor within range Stanley Excel Discussion (Misc queries) 2 January 25th 06 09:33 PM
Inefficient VBA Code - Worksheets Property Don Guillett[_4_] Excel Programming 0 July 23rd 03 08:00 PM


All times are GMT +1. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"