Hi All,
Need help on changing interior colors on text box using VBA Code. I have wrote the below code for the cell (4,7) which displays the sum of the data in cell (4,3), cell (4,4), cell (4,5) and cell (4,6).
Sub color()
If Cells(4, 7) > 50 Then
Cells(4, 7).Interior.color = RGB(255, 0, 0)
Else
Cells(4, 7).Interior.color = RGB(0, 255, 0)
End If
End Sub
However, the above code works only when i run it manually. But, i need the cell(4,7) interior color to change automatically at the time of entering the values on cells (4,3), cell (4,4), cell (4,5) and cell (4,6) or once i entered all the values in the cells (4,3), cell (4,4), cell (4,5) and cell (4,6).
Note: Cell (4,7) is already updated with the formula =C4+D4+E4+F4
Can someone help on this
Regards,
Dheepak
Need help on changing interior colors on text box using VBA Code. I have wrote the below code for the cell (4,7) which displays the sum of the data in cell (4,3), cell (4,4), cell (4,5) and cell (4,6).
Sub color()
If Cells(4, 7) > 50 Then
Cells(4, 7).Interior.color = RGB(255, 0, 0)
Else
Cells(4, 7).Interior.color = RGB(0, 255, 0)
End If
End Sub
However, the above code works only when i run it manually. But, i need the cell(4,7) interior color to change automatically at the time of entering the values on cells (4,3), cell (4,4), cell (4,5) and cell (4,6) or once i entered all the values in the cells (4,3), cell (4,4), cell (4,5) and cell (4,6).
Note: Cell (4,7) is already updated with the formula =C4+D4+E4+F4
Can someone help on this
Regards,
Dheepak