title: Excel VBA - Keeping variables the same after End Sub
body: <p>I have some code that give me some variables - <code>Champ</code>. I want to be able to run this programme, then in my next Sub() reference these variables. The code is:</p>
  
  <pre><code>  Sub CreateUniqueList()
    Dim dict As Object, lastRow As Long, Champ, c
    Set dict = CreateObject("Scripting.dictionary")
    With Sheets("Raw Data")
        lastRow = .Cells(.Rows.count, "D").End(xlUp).row
        For Each c In .Range("D7:D" &amp; lastRow).SpecialCells(xlCellTypeVisible)
          dict(c.text) = 0
        Next
    End With
    Champ = dict.Keys
  
    ' Now you have the "variables". To create the new sheet:
    With Sheets.Add(After:= Sheets(Sheets.Count))
      .Name = "Unique Champions"
      .Range("A2").Resize(dict.count).Value = Application.Transpose(dict.keys)
      .Range("A1").Value = Sheets("Raw Data").Range("D6").Value
    End With
  End Sub
  
  
  Sub Criteria ()
  If (Cells(i, 2).Value = Champ3) Then...............................
  End Sub
  </code></pre>
  
  <p>The issue is, when i try to run "Sub Criteria", <code>Champ3</code> returns the value Empty.</p>
  
  <p>How can i make it so the variable carries onto the separate programme?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: The second Sub is just there for an example</p>