Dim Color As String

 

Private Sub cmdClear_Click()

Image1.Picture = LoadPicture("C:\vb\white.bmp")

txtInput = ""       'clears TextBox

txtInput.SetFocus 'sends cursor back to TextBox

End Sub

 

Private Sub cmdSelect_Click()

Color = txtInput.Text

 

If LCase(Color) = "red" Then

Image1.Picture = LoadPicture("C:\vb\red.bmp")

 

ElseIf LCase(Color) = "green" Then

Image1.Picture = LoadPicture("C:\vb\green.bmp")

 

ElseIf LCase(Color) = "blue" Then

Image1.Picture = LoadPicture("C:\vb\blue.bmp")

 

Else

MsgBox "Color Not Available", vbInformation, "Color Program"

txtInput = ""       'clears TextBox

txtInput.SetFocus 'sends cursor back to TextBox

End If

 

End Sub

 

Private Sub cmdExit_Click()

End

End Sub