title: Resetting form in VBA
body: <p>I have a VBA form with a variety of selection options including drop downs, text fields, checkboxes and radios. </p>
  
  <p>I just wanted to know about the best way to clear all these fields with a button press. A friend of mine has tried to help by emailing me the code below but unfortunately it doesn't work, I have checked the variable names. </p>
  
  <p>Any advice on how I can improve it? </p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>Private Sub btnReset_Click()
  
  Unload Me
  UserForm.Show
  
  End Sub
  </code></pre>
  
  <p>Here is the other code for the userform.</p>
  
  <pre><code>Dim DeptCode 'Holds department code
  
  Private Sub UserForm_Initialize()
  
      Dim c_deptCode As Range
      Dim c_deptName As Range
      Dim deptCodes As Variant
      Dim deptNames As Variant
  
      Dim ws_dept As Worksheet
      Set ws_dept = Worksheets("lookupDept")
  
      ' Assign each range to an array containing the values
      deptCodes = Choose(1, ws_dept.Range("deptCode"))
      deptNames = Choose(1, ws_dept.Range("deptName"))
  
      For i = 1 To ws_dept.Range("deptCode").Rows.Count
          ' Create the combined name (code + space + name)
          CombinedName = deptCodes(i, 1) &amp; " - " &amp; deptNames(i, 1)
          cbo_deptCode.AddItem CombinedName
      Next i
  
  End Sub
  </code></pre>