title: RibbonX Editor Callbacks and Interaction
body: <p>I have (quite basic) question about RibbonX callback functions.</p>
  <p>I coded some macros with VBA packed in VBA modules and created a ribbon tab by using <code>Office RibbonX Editor</code>.</p>
  <p>I created an XML with the editor like so...</p>
  <pre><code>&lt;customUI xmlns=&quot;http://schemas.microsoft.com/office/2006/01/customui&quot;&gt;
      &lt;ribbon startFromScratch=&quot;false&quot;&gt;
          &lt;tabs&gt;
              &lt;tab id=&quot;maintab&quot; label=&quot;My Macros&quot;&gt;
                  
                  &lt;group id=&quot;g_general&quot; label=&quot;General&quot;&gt;
                      &lt;button
                          id=&quot;btn_toggle_confidential&quot;
                          label=&quot;Toggle Confidential&quot;
                          onAction=&quot;Toggle_Confidential_Text&quot;
                          size=&quot;large&quot;
                          imageMso=&quot;MailMergeUpdateLabels&quot;
                          supertip=&quot;Toggles the visibility of the 'confidential' tag in the master and in the title layout.&quot; /&gt;
  ...
  </code></pre>
  <p>...for all functions that I want available in the ribbon, such as e.g. :</p>
  <pre><code>Sub Toggle_Confidential_Text()
      If Has_Confidential_Text() = False Then
          MsgBox &quot;ATTENTION! There is no confidential tag in the slide master!&quot;
          Exit Sub
      End If  
      ' etc...
  End Sub
  </code></pre>
  <p><em>Everything works fine and as expected!</em></p>
  <p>In the &quot;callbacks viewer&quot; of the ribbonX editor I see this:</p>
  <pre><code>'Callback for btn_toggle_confidential onAction
  Sub Toggle_Confidential_Text(control As IRibbonControl)
  End Sub
  </code></pre>
  <p>My question is:</p>
  <ol>
  <li>How does this accurately connect the button to the function in my code module? Or is this just some simplified display of the &quot;routing&quot; that is done under the hood?</li>
  <li>Is the <code>IRibbonControl</code> parameter automatically passed, even though my own subroutine declaration doesn't mention it?</li>
  <li>Can I (or how can I) access the <code>IRibbonControl</code> parameter in my subroutine to interact with the ribbon element? Do I need to redesign my approach and wrap my subroutines or can I just access the parameter, because it's implicitly passed?</li>
  </ol>