title: Overriding events of excel sheet using VBA
body: <p>I need to programmatically override the following events of a worksheet:</p>
  
  <ul>
  <li>BeforeDoubleClick</li>
  <li>SelectionChange</li>
  <li>BeforeRightClick</li>
  </ul>
  
  <p>I have been able to override the OnActivate event using the following code:</p>
  
  <pre><code>sheet.OnSheetActivate = "MyOwn_Activate"
  
  
  Private Sub MyOwn_Activate()
  
      myForm.Show
  
  End Sub
  </code></pre>
  
  <p>I have implemented BeforeDoubleClick on similar lines:</p>
  
  <pre><code>sheet.OnDoubleClick = "My_BeforeDoubleClick"
  
  Private Sub My_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  ...
  End Sub
  </code></pre>
  
  <p>However, an <strong>'argument not optional'</strong> error is thrown at run-time when user double clicks a cell on the sheet. Can someone please suggest how should I pass the paramters?</p>
  
  <p>In addition,  I am not able to find event names for SelectionChange &amp; BeforeRightClick. I tried:</p>
  
  <pre><code>sheet.BeforeRightClick = "My_BeforeRightClick"
  sheet.SelectionChange = "My_SelectionChange"
  </code></pre>
  
  <p>But, both the above lines do not work.</p>
  
  <p>Any help/ suggestion is greatly appreciated.</p>
  
  <p>Thanks :)</p>