title: Global variable loses value after userform
body: <p>I know there're several similar questions out there, though I'm afraid none of their answers solve my problem.</p>
  <p>I created a simple file to test the problem. Code in Sheet1:</p>
  <pre><code>Public aaa As String
  
  Sub abc()
      UserForm1.Show
      Debug.Print aaa
  End Sub
  </code></pre>
  <p>Code in UserForm1:</p>
  <pre><code>Private Sub CommandButton1_Click()
      aaa = TextBox1.Text
      Debug.Print aaa
      Unload UserForm1
  End Sub
  </code></pre>
  <p>I run the code line by line, the Debug.Print before Unload works fine; and the public var loses its value right after the userform is unloaded.
  I've tried to change Unload to Hide, didn't work. The value of the global var loses anyway.</p>
  <p>I thought this test file is simple enough to avoid any problem...can anyone tell me why the global var cannot keep its value? Thank you.</p>