title: Check if all comboboxes are not empty
body: <p>I have a form where I need to put several information to schedule a medical appointment.</p>
  
  <p>Before I register the appointment, I want the code to check if any of the textboxes and comboboxes are empty, and If so, to display a <code>MsgBox</code> telling that it'is empty and restart the filling of the form (without losing all the other comboboxes/textboxes that aren't empty).</p>
  
  <p>My code:</p>
  
  <pre><code>Private Sub btCadastra_Click()
      Sheets("AGENDA").Select
  
      lastrow1 = (Range("A" &amp; Rows.Count).End(xlUp).Row)
      Range("A" &amp; lastrow1).Select
      ActiveCell.Offset(1, 0).Select
  
      Dim data_cad As Date
  
      id = lastrow1
  
      ActiveCell = id
      ActiveCell.Offset(0, 1).Select
      ActiveCell = cmbProfissional
      ActiveCell.Offset(0, 3).Select
      ActiveCell = txtData
      ActiveCell.Offset(0, 1).Select
      ActiveCell = txthorario
      ActiveCell.Offset(0, 1).Select
      ActiveCell = cmbDescricao
      ActiveCell.Offset(0, 1).Select
      ActiveCell = cmbNomePaciente
      ActiveCell.Offset(0, 1).Select
      ActiveCell = cmbStatus
      ActiveCell.Offset(0, 1).Select
      ActiveCell = Format(Date, "dd/mm/yyyy") &amp; " - " &amp; Time
  
      MsgBox "Dados cadastrados com sucesso", vbExclamation
  
      Unload Me
      frmAgenda.Show
  End Sub
  </code></pre>