title: Initializing a UserForm and Loading Variables with VBA in Excel
body: <p>I have a userform with an initialize event as follows:</p>
  
  <pre><code>Public CurrSpanNum, CurrSegNum As Integer
  Private Sub UserForm_Initialize()
  
          CurrSegNum = Sheets("UserData").Range("C2").value
          Debug.Print "SegForm, SpanNum = " &amp; CurrSpanNum
          CurrSpanNum = Sheets("UserData").Range("D2").value
          Debug.Print "SegForm, SegNum = " &amp; CurrSegNum
  
  End Sub
  </code></pre>
  
  <p>In the immediate window I see:</p>
  
  <pre><code>SegForm, SpanNum = 
  SegForm, SegNum = 3
  </code></pre>
  
  <p>The value 3 is placed in both cells before the form is initialized. Why can't I seem to load SpanNum while SegNum is able to load?</p>