Make an Input box on a Userform Required and change colour when completed

tigerdel

New member
Joined
Aug 23, 2012
Messages
40
Reaction score
0
Points
0
Location
Cambridgeshire
Excel Version(s)
Office 365
Hi All

I have a Userform with a number of Required Text fields and drop down boxes

I would like them to have a backcolor of yellow until an entry is added and then return to white

Any ideas how I can make the fields required and have the color scheme?

Thanks all

D
 
tigerdel

something like
Code:
Private Sub ComboBox1_Change()
    If Len(Me.ComboBox1.Text) > 0 Then
        Me.ComboBox1.BackColor = vbWhite
    Else
        Me.ComboBox1.BackColor = vbYellow
    End If
End Sub
 
Back
Top