# GrapeCity.Spreadsheet.WinForms.Ribbon.IRibbonForm.OnExecuteCommand

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_WinForms_Ribbon_IRibbonForm_OnExecuteCommand_" data-uid="GrapeCity.Spreadsheet.WinForms.Ribbon.IRibbonForm.OnExecuteCommand*">OnExecuteCommand Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_WinForms_Ribbon_IRibbonForm_OnExecuteCommand_" data-uid="GrapeCity.Spreadsheet.WinForms.Ribbon.IRibbonForm.OnExecuteCommand*"></a>
<h4 id="GrapeCity_Spreadsheet_WinForms_Ribbon_IRibbonForm_OnExecuteCommand_System_Object_GrapeCity_Spreadsheet_WinForms_Ribbon_ExecuteCommandEventArgs_" data-uid="GrapeCity.Spreadsheet.WinForms.Ribbon.IRibbonForm.OnExecuteCommand(System.Object,GrapeCity.Spreadsheet.WinForms.Ribbon.ExecuteCommandEventArgs)">OnExecuteCommand(object, ExecuteCommandEventArgs)</h4>
<div class="markdown level1 summary"><p>Occurs when the specified command in ribbon bar should be executed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void OnExecuteCommand(object sender, ExecuteCommandEventArgs e)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub OnExecuteCommand(sender As Object, e As ExecuteCommandEventArgs)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">sender</span></td>
      <td><p>The ribbon bar</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.WinForms.Ribbon.ExecuteCommandEventArgs.html">ExecuteCommandEventArgs</a></td>
      <td><span class="parametername">e</span></td>
      <td><p>The information of command</p>
</td>
    </tr>
  </tbody>
</table>
</div>
