0

Hi i got a sheet in a work book that i am working on now with form control (dropdown). The code i made changes the color for the text in the entire row, or highlights it, works fine.
But i would like to add code to change the cell value from the number that appear in the cell, to the word shown in the control.
Not entirely sure how to do that.

Sub RullegardinA67_Endre()
Set MyColouredRow = Range("A67")
    For Each Cell In MyColouredRow
        Select Case Cell.Value
            Case Is = "1"
                Cell.EntireRow.Font.ColorIndex = 1
            Case Is = "2"
                Cell.EntireRow.Font.ColorIndex = 3
            Case Is = "3"
                Cell.EntireRow.Font.ColorIndex = 5
            Case Is = "4"
                Cell.EntireRow.Font.ColorIndex = 7
            Case Is = "5"
                Cell.EntireRow.Font.ColorIndex = 17
            Case Is = "6"
                Cell.EntireRow.Font.ColorIndex = 4
            Case Is = "7"
                Cell.EntireRow.Interior.ColorIndex = 6
                Cell.EntireRow.Font.ColorIndex = 1
            Case Else
                Cell.EntireRow.Interior.ColorIndex = xlNone
                Cell.EntireRow.Font.ColorIndex = 1

        End Select

    Next
End Sub
2
Contributors
1
Reply
22
Views
1 Year
Discussion Span
Last Post by hometownnerd
0

Would it be possible for you to include the excel so we can see it? I think this is relatively easy but I wonder how the finding the control on the row would work. I would think if you named them with something that would make it easy to find them inside the code would help. It would be easier for me to help if I saw your excel though so I can play with it a little.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.