title: Determine which command button was clicked to open userform
body: <p>I have two command buttons (<code>cmd1</code> and <code>cmd2</code>) on <code>userform1</code>, when clicked each show the same userform (<code>userform2</code>). Within the <code>initialize</code> or <code>load</code> sub is it possible to determine which command button was clicked on <code>userform1</code> and therefore show the form differently? I imagine the code in either the <code>initialize</code> or <code>load</code> sub on <code>userform2</code> to have the following skeleton:</p>
  
  <pre><code>if (cmd1 was clicked)
  ' do stuff relating to 1
  elseif (cmd2 was clicked)
  ' do stuff relating to 2
  else
  ' error handling
  End if
  </code></pre>
  
  <p>The respective "<code>stuff</code>" could be moved into the event handler for <code>cmd1</code> and <code>cmd2</code> however, if the method described above can be used it will be a lot simpler and cleaner.</p>