title: Scope of a variable from Form to Class Module VBA
body: <p>I have a Form UserForm1 having two command buttons command 1 and command 2. The variable var = 1 when command1 is pressed and var=2 if command 2 is pressed. Var is a global variable in UserForm1. expDate and textRecDate are two textboxes in UserForm1</p>
  
  <p>I have a class module clsMod and I am trying to do something like this</p>
  
  <pre><code>If UserForm1.var= 1 Then 
      UserForm1.expDate.Text = SelectedDate
  If UserForm1.var= 2 Then 
      UserForm1.textRecDate.Text = SelectedDate
  </code></pre>
  
  <p>I want to extend the scope of var to the class module. Is there a way I can do that. </p>
  
  <p>thanks</p>