Hello,
I have a userform with a label "txtRest" using the following code to get the total amount. (this code is in subroutine "txtTotal_Change")
What I'm looking for is change the Back color of this label to "Yellow" in case the amount is greater than Zero
In case "Zero" change it to White
Please help me with this and in which sub I should add the code?
Another favor if possible, Is there any short way for the above code, since I'm using it with many textboxes
I have a userform with a label "txtRest" using the following code to get the total amount. (this code is in subroutine "txtTotal_Change")
Code:
Me.txtRest = (IIf(Format(Me.txtTotal, "#,##0") = "", 0, (Format(Me.txtTotal, "#,##0"))) + 0) - (IIf(Format(Me.txtPaid, "#,##0") = "", 0, (Format(Me.txtPaid, "#,##0"))) + 0)
What I'm looking for is change the Back color of this label to "Yellow" in case the amount is greater than Zero
In case "Zero" change it to White
Please help me with this and in which sub I should add the code?
Another favor if possible, Is there any short way for the above code, since I'm using it with many textboxes