
colorear textbox segun condicion
Publicado por juan (9 intervenciones) el 02/09/2014 00:27:23
Alguien me puede ayudar con esto.
si el resultado del textbox3 es:
hasta 20% rojo
entre 20% y 40% amarillo
mas de 40% verde
TextBox3 = ((TextBox2.Value) / (TextBox1.Value)) * 100
If TextBox3 < 0.2 Then TextBox3.BackColor = &H8000000F: Exit Sub 'Rojo
If TextBox3 <> 0.21 & 0.4 Then TextBox3.BackColor = &HFFFF&: Exit Sub 'Amarillo
If TextBox3 > 0.4 Then TextBox3.BackColor = &HC000& 'Verde
y no me anda; tambien le quiero poner % al textbox 3
muchisimas gracias
Juan
si el resultado del textbox3 es:
hasta 20% rojo
entre 20% y 40% amarillo
mas de 40% verde
TextBox3 = ((TextBox2.Value) / (TextBox1.Value)) * 100
If TextBox3 < 0.2 Then TextBox3.BackColor = &H8000000F: Exit Sub 'Rojo
If TextBox3 <> 0.21 & 0.4 Then TextBox3.BackColor = &HFFFF&: Exit Sub 'Amarillo
If TextBox3 > 0.4 Then TextBox3.BackColor = &HC000& 'Verde
y no me anda; tambien le quiero poner % al textbox 3
muchisimas gracias
Juan
Valora esta pregunta


0