Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TML TML is offline
external usenet poster
 
Posts: 1
Default how do i conditional formate a text box

I have some text boxes set to display the contents of a cell. that cell has
conditional formating to change color when a certain value is entered. I also
want the text box fill color to change with that value.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 220
Default how do i conditional formate a text box

One way to do it is to use Visual Basic. Here is one solution:

http://www.mrexcel.com/forum/showthread.php?t=12097

You can make the Visual Basic have the same conditions, and set the same
background colors, as the conditional formating you are using in the linked
cell.

HTH,

Eric

"TML" wrote:

I have some text boxes set to display the contents of a cell. that cell has
conditional formating to change color when a certain value is entered. I also
want the text box fill color to change with that value.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 220
Default how do i conditional formate a text box

Here is a simple version that toggles the background and foreground colors of
a textbox if the textbox has a certain value in it:

Private Sub TextBox1_Change()
If Me.TextBox1.Value = "Y" Then
Me.TextBox1.ForeColor = RGB(250, 225, 122) ' Font color
Me.TextBox1.BackColor = RGB(150, 125, 222) ' Background color
Else
Me.TextBox1.ForeColor = RGB(0, 0, 0) ' Font color
Me.TextBox1.BackColor = RGB(255, 255, 255) ' Background color
End If
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how do i conditional formate a text box

Me.TextBox1.BackColor = Range("A1").Interior.Color

If this post helps click Yes
---------------
Jacob Skaria


"TML" wrote:

I have some text boxes set to display the contents of a cell. that cell has
conditional formating to change color when a certain value is entered. I also
want the text box fill color to change with that value.

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
Conditional formate Suleman[_2_] Excel Discussion (Misc queries) 2 January 16th 09 10:42 PM
conditional formate charts for fun Excel Discussion (Misc queries) 2 September 28th 08 03:02 AM
HOW TO FORMATE PART OF TEXT FROM TEXT STRING Vishal[_2_] Excel Discussion (Misc queries) 2 June 10th 08 04:18 PM
Convert text number to number formate [email protected] Excel Discussion (Misc queries) 2 April 9th 07 10:48 AM
Conditional formate:show by color when expiration dates are overdu dan Excel Discussion (Misc queries) 0 August 24th 06 10:27 PM


All times are GMT +1. The time now is 02:35 PM.

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"