Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
damorrison
 
Posts: n/a
Default conditional format a label

I have a UserForm that that has several textboxes and labels, when the
text box changes it calculates and the value is put into a label
caption

is there a way to get a label to turn red if the value is less than
8.25??

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default conditional format a label

Only by checking the value in the textbox on completion, such as the Exit
event, and then setting the label colour.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"damorrison" wrote in message
oups.com...
I have a UserForm that that has several textboxes and labels, when the
text box changes it calculates and the value is put into a label
caption

is there a way to get a label to turn red if the value is less than
8.25??



  #3   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default conditional format a label

Try:

If Val(Label1.Caption) < 8.25 Then
Label1.BackColor = &HFF& '<===Red
Else
Label1.BackColor = &H8000000F '<== standard
End If


"damorrison" wrote:

I have a UserForm that that has several textboxes and labels, when the
text box changes it calculates and the value is put into a label
caption

is there a way to get a label to turn red if the value is less than
8.25??


  #4   Report Post  
Posted to microsoft.public.excel.misc
damorrison
 
Posts: n/a
Default conditional format a label

Unbelievable, it really works, at first I put the code in the label1
click and it only worked when I clicked on the label
Then I put it in the textbox change, and voila, works every time
Thanks, very cool

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
Cell Format Changes When Data Is Entered - Not Conditional Formatt SundanceKidLudwig Excel Worksheet Functions 2 September 30th 05 02:07 PM
Conditional format of minimum number MaggieMagill Excel Worksheet Functions 6 September 25th 05 11:36 PM
Conditional format question [email protected] Excel Discussion (Misc queries) 7 September 16th 05 04:15 PM
copy conditional format to regular format GDC Setting up and Configuration of Excel 3 May 4th 05 09:35 PM
Conditional Format Question DougS Excel Worksheet Functions 3 May 3rd 05 01:36 AM


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

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

About Us

"It's about Microsoft Excel"