title: Refreshing custom ribbon button which relies on a table to get the label and image
body: <p>I have a custom ribbon and one of the buttons on it (image and label for the button) are supposed to change based on what happens in one of the forms (so, essentially, it's supposed to change when values in a table change and making changes in the form is the trigger for the change).</p>
  <p>On the CLOSE button of the form I have the following code:</p>
  <pre><code>sbRefreshRibbon
  MyRibbon.Invalidate
  </code></pre>
  <p>and here is what the procedure does, so the MyRibbon.Invalidate part is probably redundant:</p>
  <pre><code>Public Sub sbRefreshRibbon()
  On Error GoTo RestartApp
  MyRibbon.Invalidate
  On Error GoTo 0
  Exit Sub
  RestartApp:
    MsgBox &quot;Please restart Application for Ribbon changes to take effect&quot;, _
      vbCritical, &quot;Ribbon Refresh Failed&quot;
  End Sub
  </code></pre>
  <p>In any case, sometimes, when clicking CLOSE I get the &quot;Please restart Application for Ribbon changes to take effect&quot; error. After restarting, all is well, the label is correct and so is the image
  but, how can I make the label and image change without errors and restarts?</p>