title: Can I set an Excel ComboBox to have a default value?
body: <p>My ComboBox (named <code>ddDatabase</code>) can have either one of two values. These two values are pulled from a table in a separate worksheet. When I open the Excel file, however, neither of the two values are selected. Instead the ComboBox appears empty. Is there any way to explicitly set a specific value to be the default?</p>
  
  <p>After some further testing, it appears that if the Excel file is saved with the first item of the ComboBox selected, the next time the file opens it will default to blank. Selecting any other value in the ComboBox other than the first will preserve the selection after you save, close, and re-open.</p>
  
  <p>I've tried to use VBA to solve this issue by setting the value when the workbook is opened using this code:</p>
  
  <pre><code>Sub Workbook_Activate()
  
      Dim ddDatabase As DropDown
      Set ddDatabase = ActiveSheet.DropDowns("ddDatabase")
      ddDatabase.Value = 1
  
  End Sub
  </code></pre>
  
  <p>Unfortunately, it throws the following error:</p>
  
  <p><code>unable to set the value property of the dropdown class</code></p>
  
  <p>Is there a solution to this?</p>