Mega Code Archive

 
Categories / VisualBasic Script / Forms
 

Change control back ground color

Sub Form_Current()     Dim ctl as Control     For Each ctl In Controls         If TypeOf ctl Is TextBox Then             If IsNull(ctl.Value) Then                 ctl.BackColor = vbCyan             Else                 ctl.BackColor = vbWhite             End If         End If     Next ctl End Sub