title: Excel VBA Time Format as decimal with Combobox
body: <p>Very basic, and very annoying, I have searched solution for many hours with no help...</p>
  
  <p>Problem: I'm populating Combobox from named range, range is list of times (formatted as time :-), Combo seems fine, drop-down shows my times as they should be, but when selected time is formatted as a decimal number...</p>
  
  <p><img src="https://i.stack.imgur.com/P6LgU.jpg" alt="alt text"></p>
  
  <p>Here is the code (ripped down to bare minimum):</p>
  
  <pre><code>Private Sub UserForm_Initialize()
      ComboBoxTime.RowSource = "Help!Time" 
  End Sub
  </code></pre>
  
  <p>"Help" is name of worksheet containing named range "Time"I have tried formatting different ways with no luck...</p>
  
  <pre><code>ComboBoxTime = Format(ComboBoxTime, "hhmm")
  </code></pre>
  
  <p>Here is link to sample. <a href="http://www.equstom.fi/dateproblem.html" rel="nofollow noreferrer">http://www.equstom.fi/dateproblem.html</a></p>
  
  <p>(And yes I need to populate from named range, instead for each loop, and I will set .value with code, Whole document is actually quite complex, but I included just The problem part...)</p>