Results 1 to 2 of 2

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

  1. #1
    Acolyte tigerdel's Avatar
    Join Date
    Aug 2012
    Location
    Cambridgeshire
    Posts
    29
    Articles
    0

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



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •