title: Accessing Variable Declared in ThisWorkbook in a Userform Initialize Sub
body: <p>I'm setting up the userform based on User input of 1 to 5, however, I can't seem to get this input into the Userform_Initialise sub.</p>
  
  <pre><code>Public TP As String 'this is in ThisWorkbook; from here
  
  Private Sub Workbook_Open()
  
  Dim RT As String
  
  ReEnter:
  
      RT = Application.InputBox("1 - Monthly" &amp; vbNewLine &amp; "2 - Quarterly" &amp; vbNewLine &amp; "3 - Semi-Annually" &amp; _
      vbNewLine &amp; "4 - Semi-Annually" &amp; vbNewLine &amp; "5 - Others", "Type of 
      Report", "Enter Number Here", Type:=1)
      If RT &gt;= 1 And RT &lt;= 5 Then
          TP = Val(RT)
      Else
          MsgBox "Error", vbCritical
          GoTo ReEnter
  
      End If
  
  UserForm1.Show
  
  End Sub 'to here
  
  'This onwards is in Userform
  Private Sub Userform_Initialize()
  
  Debug.Print TP
  
  End Sub
  </code></pre>
  
  <p>How do I get the code to recognise the User Input <code>TP</code> in the Userform? Thanks in advance!</p>