Label Change Color When Text in cell is "true" on userform

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
HM HM HM i thanks for the idea But that Combo stuff give me LONG hair

but give it a try any way

thanks for you help So Far
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
I have now Try you Solution and put code in and made a Single userform And combo work but code stop with error in this Line

Code:
Sub resetLabels()   With Sheets("Cup 128")
      For i = Rw To Rw + 29 Step 4
         j = j + 1
         If .Range("E" & i).Value <> False Then[COLOR=#ffff00] [/COLOR][COLOR=#ff0000]Me.Controls("Label" & j).Caption = .Range("E" & i).Value[/COLOR][COLOR=#ffff00][/COLOR]
         If .Range("E" & i + 1).Value <> False Then Me.Controls("Label" & j + 1).Caption = .Range("E" & i + 1).Value
         Me.Controls("Label" & j).BackColor = IIf(.Range("D" & i).Value, vbRed, vbWhite)
         Me.Controls("Label" & j + 1).BackColor = IIf(.Range("D" & i + 1).Value, vbRed, vbWhite)
         j = j + 1
      Next i
 

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
I must SAY that Was Brilliant

i thanks for that Idea and will use it for my Big file Later with Lots of Game Solutions

SO Thanks Again for you help
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,320
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
Hey Fluff First of all Thanks Again for Your Help so far..

the first 1-8 works Brilliant

but i Need some help with the Last And most Importen Board "The Finale Games from the last 16 Players who run Through Round 1 to 8

and on that Userform there are NO textbox's Only Labels from Label40 to Label69
Label40 to Label55 takes data from "E264 to E306" 16 players left 1/8 Finale)
Label56 to Label63 takes data from "I267 to E304" 8 Players left (Quarter Finale)
Label64 to Label67 takes data from "M273 to M298" 4 Players left (semi Finale)
Label68 to Label69 takes data from "R265 to R266" 2 Players left (Finale)

Label70 came by read cell where Vwinner is

and Same numbers of Commandbuttons (CB) start from
CB40 for Label40 to CB55 for Label55
CB56 for Label56 to CB63 for label63
CB64 for Label64 to CB67 for Label67
CB68 for Label68 to CB69 for Label69

Hope that was enough
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,320
Office Version
365
Platform
Windows
Use this
Code:
Sub resetLabels()
   With Sheets("Cup 128")
        J = 39
      For i = 264 To 307 Step 4
         J = J + 1
         If .Range("E" & i).Value <> False Then Me.Controls("Label" & J).Caption = .Range("E" & i).Value
         If .Range("E" & i + 1).Value <> False Then Me.Controls("Label" & J + 1).Caption = .Range("E" & i + 1).Value
         Me.Controls("Label" & J).BackColor = IIf(.Range("D" & i).Value, vbRed, vbWhite)
         Me.Controls("Label" & J + 1).BackColor = IIf(.Range("D" & i + 1).Value, vbRed, vbWhite)
         J = J + 1
      Next i
      For i = 267 To 304 Step 8
         J = J + 1
         If .Range("I" & i).Value <> False Then Me.Controls("Label" & J).Caption = .Range("I" & i).Value
         If .Range("I" & i + 1).Value <> False Then Me.Controls("Label" & J + 1).Caption = .Range("I" & i + 1).Value
         Me.Controls("Label" & J).BackColor = IIf(.Range("H" & i).Value, vbRed, vbWhite)
         J = J + 1
      Next i
   End With
End Sub
This will get rid of the problem when loading the form, but some of your commandbuttons are looking at the labels/buttons
 

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
thanks THAT was fast

i take a look on my Commandbuton/labels when i get Home from Job
 

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
180
Code:
https://www.dropbox.com/s/u87vnpomy0nfenj/total%20changes.xlsm?dl=0
new link to my file Just try it at Work after i got some spare time (LOL)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,320
Office Version
365
Platform
Windows
Is it working?
If not what problems do you get?
 

Watch MrExcel Video

Forum statistics

Threads
1,101,748
Messages
5,482,620
Members
407,354
Latest member
Calvince

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top