title: BeforeRightClick acts only on PREVIOUSLY clicked cell
body: <p>I'm very new to excel VBA, I've searched many posts and sites, but cannot find out why...</p>
  
  <p>My Goal:
  Right click on a cell, a form with a textbox opens, the clicked cell's address is shown in the textbox.</p>
  
  <p>I've tried some very standard code... like so:</p>
  
  <pre><code>    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
      Cancel = True
      UserForm1.Show
      With UserForm1.TextBox1
       .Text = Target.Address
      End With
      End Sub
  </code></pre>
  
  <p>Here's the bug (step by step of my test results)</p>
  
  <pre><code>1. I right click A1, the form opens, textbox displays null.
  2. I right click D3, the form opens, NOW the textbox displays A1.
  3. I right click E4, the form opens, NOW the textbox displays D3.
  </code></pre>
  
  <p>The textbox always displays the address of the <i>previously right-clicked cell</i>. I need the textbox to display the address of what I just right-clicked.</p>
  
  <p>Please provide some insight on why this happens and how to correct this, thanks guys!</p>