title: Updating caption on ActiveX button in Excel vba
body: <p>I'm trying to update the caption of an ActiveX control button on an Excel spreadsheet to note that the code associated with the click event is working. The code pulls data from an azure database so pressing the button triggers anywhere from a 5-10 sec delay.</p>
  
  <p>My original code had a single sub that essentially looked like this:</p>
  
  <pre><code>Sub GetInfofromDB()
    btnUpdate.Caption = "Updating...."
    &lt;&lt;code to get data from azure db&gt;&gt;
    btnUpdate.Caption = "Update List" 'reverts button to standard text
  End Sub
  </code></pre>
  
  <p>However the button caption never changes. The combobox update works. </p>
  
  <p>I separated the caption update into its own sub and then called each sub in order when the button was pressed and got the same behavior, no button update.</p>
  
  <p>If I call the sub with the caption update without calling the data update the button updates successfully.</p>
  
  <p>So, each part works on its own but not when they happen serially. Ideas how to get my button to update prior to the data call?</p>
  
  <p>thanks.  mark</p>