title: Disable button using Excel VBA
body: <p>I want to disable a button with VBA code like this:</p>
  
  <pre><code>ActiveSheet.Shapes("Button 1").ControlFormat.Enabled = False
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>Set b1 = ActiveSheet.Buttons("Button 1")
  b1.Enabled = False
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>Me.Shapes("Button 1").ControlFormat.Enabled = False
  </code></pre>
  
  <p>My button name is correct, because it doesn't give me an error message, so the code is completely run through.</p>
  
  <p>After this script I can click on that button and the assigned macro runs. Nothing should happen when I click on it.</p>