title: UserForm vanishes when clicking ComboBox
body: <p>First I’m a novice.  I’ve been reading, experimenting, and Googling to get this far, but haven’t found anything that helps me understand this.</p>
  <p>I’m trying to build a UserForm to collect range data.  It’s part of a data centralization effort to add data to “history” workbooks, processing them to track changes and update current interpretations if they’ve changed. The sources vary, but are large and consistent enough to be worth the effort to automate.</p>
  <p>Also, I work on am isolated (closed) network so I’ve retyped my code, hopefully (mostly) correctly here.</p>
  <p>My UserForm code is:</p>
  <pre><code>Private Sub UserForm_Initialize()
  Dim wb as Workbook, lastwb as Workbook
  
      For Each wb in Application.workbooks
          comboBox1.addItem wb.name
      next
      ComboBox1 = ActiveWorkbook.name
  End sub
  
  Private Sub ComboBox1_Change()
       If ComboBox1 &lt;&gt; &quot;&quot; then Application.Workbooks(ComboBox1.Text).Activate
       Label1.Caption = &quot;&quot;: RefEdit1 = &quot;&quot;
  End sub
  
  Private Sub RefEdit1_Change()
      Label1.Caption = &quot;&quot;
      If RefEdit1.value &lt;&gt; &quot;&quot; then
      Label1.Caption = &quot;[&quot; &amp; ComboBox1 &amp; &quot;]&quot; &amp; Replace(refEdit1, &quot;!&quot;, &quot;'!&quot;)
  End sub
  </code></pre>
  <p>I’m calling it with</p>
  <pre><code>Private Sub addToHistory()
  Dim range1 as range
  Dim … 'other variables and code
  
  With New Userform
     .Show
     range1 = .label
     .Hide
     Unload Userform1
  
  Debug.Print range1
  … 'other code to close/save my workbooks
  End Sub
  </code></pre>
  <p>Whenever I try to click on my combo box it vanishes.  Even marking every line in the UserForm code for debugging, it simply vanishes leaving me with no clue what happened or how to prevent it.</p>