title: Prevent User to Select Combo Box correctly in Macro Excel
body: <p>I tried to create userform in Macro and create combo box selection for color. 
  <a href="https://i.stack.imgur.com/bIM1L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bIM1L.png" alt="Source"></a></p>
  
  <p><a href="https://i.stack.imgur.com/hJWG2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hJWG2.png" alt="interface"></a></p>
  
  <p>I have successfully created the combo box as follow and prevent the user to continue without filling the combo box. here is the code:</p>
  
  <pre><code>Private Sub UserForm_Initialize()
  ComboBox1.RowSource = "Sheet1!A1:A" &amp; Range("G" &amp; Rows.Count).End(xlUp).Row
  End Sub
  --------------------------------------------
  Private Sub CommandButton1_Click()
  
  If ComboBox1.Text = "" Then
      MsgBox "Please Select Color!"
      Exit Sub
  
  Else
  Sheets("Sheet1").Range("B1").Value = ComboBox1.Value
  ActiveWorkbook.Close
  End If
  </code></pre>
  
  <p>However, the user can type random text on the combo box and I can't prevent it. 
  Is there any way to make the user can only select the value from provided source? here is the case.</p>
  
  <p><a href="https://i.stack.imgur.com/p1nyz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p1nyz.png" alt="Problem"></a></p>