title: Excel VBA time-formatted combo box
body: <p>What is the best code to create a combobox in a userform to display times as HH:MM AM/PM?</p>
  
  <p>Right now, I have the source for the combobox times as a range of decimal values representing 1-minute increments in worksheet; the formatting of the time is done on a combobox change event (there are 14 comboboxes named in order by number, so it loops through all 14 when the last one is changed).</p>
  
  <pre><code>Private Sub COMBOBOX_14_Change()
  
      Dim i As Integer
  
          i = 1
          For i = i To 14 Step 1
              INPUT_FORM.Controls("COMBOBOX_" &amp; i) = Format(INPUT_FORM.Controls("COMBOBOX_" &amp; i), "HH:MM AM/PM")
  
          Next i
  
          End Sub
  </code></pre>