title: How to undo macro task in excel
body: <p>I am using excel 2010.</p>
  
  <p>I have recorded following macro for playback (edited) and used customUI editor to make excel addin.</p>
  
  <p>This is my first macro encounter with excel.</p>
  
  <pre><code>Sub Open1(control As IRibbonControl)
      With Selection.Interior
          .Pattern = xlSolid
          .PatternColorIndex = xlAutomatic
          .Color = 65535
          .TintAndShade = 0
          .PatternTintAndShade = 0
      End With
      ActiveCell.FormulaR1C1 = "SomeText"
  End Sub
  </code></pre>
  
  <p>Why the task is not being recorded for redo?</p>
  
  <p><a href="https://i.stack.imgur.com/h37EC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h37EC.png" alt="enter image description here"></a></p>