January 30, 2020
I have a text box on my line of orders on my warehouse module and I have VBA code for 1 cell that tells me QTY ordered in H9 that is less than QTY in stock please indicate RED. However, it indicates RED when its ZERO????
Is there anything on the below code that I have missed????
Private Sub Deg6_Change()
If Sheet12.Range("H9").Value > Sheet12.Range("K9").Value Then
MeDeg6.BackColor = vbRed
Else Me.Deg6.BackColor = vbGreen
October 5, 2010
It's always best to supply your workbook and code so we can see exactly what you are working with and give a better answer.
Is the value in K9 text, rather than a number?
When I run the above code it works fine for me, except when I make K9 a text value.