title: Pass variable into button_click procedure
body: <p>Is it possible to pass a variable into a button_click procedure?</p>
  
  <p><strong>Background:</strong></p>
  
  <p>I have 2 procedures, both of which perform some actions, and then both open Form_1. Now, dependant on which procedure opened Form_1, I want the command button to perform a different task with the data on the form. Ordinarily, I would pass a variable from the first procedure into the procedure being called. </p>
  
  <p>However, due to it being a form being called, which requires the user to click the command button to initiate the second procedure, I do not think it's possible to pass a variable to this procedure?</p>
  
  <p>For now I assign a public  variable in procedure_1: <code>override = False</code> and procedure_2: <code>override = True</code>, but I know it's generally frowned upon to use public variables (from what I have read).</p>
  
  <p>Within the button_click procedure I then use this variable to route the code accordingly.</p>
  
  <pre><code>Private Sub CommandButton1_Click()
      If override Then
          Call override_data
      Else
          Call submit_data
      End If
  End Sub
  </code></pre>
  
  <p>Am I okay, in this scenario, to use a public variable? or is there a better way to achieve my target?</p>