Label Change Color When Text in cell is "true" on userform
Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 55

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

  1. #21
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    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

  2. #22
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    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 ThenMe.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

  3. #23
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

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

    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  4. #24
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    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

  5. #25
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

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

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  6. #26
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    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

  7. #27
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

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

    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
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  8. #28
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    thanks THAT was fast

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

  9. #29
    Board Regular
    Join Date
    Jun 2018
    Location
    Denmark
    Posts
    154
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

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

    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)

  10. #30
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

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

    Is it working?
    If not what problems do you get?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •