title: Modifying the "Next" button code so it works with a "Previous" button
body: <p>I have a "Next" button that runs the following code. It copies the contents of the next (below) row of the source range and pastes it to a cell in the destination sheet.</p>
  
  <p>I would also like to have similar code that is run by a "Previous" button which copy/pastes the contents of the previous row (above) instead.</p>
  
  <p>I tried <code>- 1</code> instead of <code>+ 1</code>, but that didn't work.</p>
  
  <p>Can someone here help me to modify the code to correctly create a "Previous" button?</p>
  
  <pre><code>Option Explicit
  
  Sub Button1_Click()
  
      Const s_DestSheet As String = "MIRCALCULATION"
      Const s_DestRange As String = "F5"
      Const s_SrcSheet As String = "MIRDATA"
      Const s_SrcCell As String = "A1:A100"
  
      Static sidxCurrentCell As Variant: If IsEmpty(sidxCurrentCell) Then sidxCurrentCell = 1
  
      With Worksheets(s_SrcSheet).Range(s_SrcCell)
          sidxCurrentCell = (sidxCurrentCell + 1) Mod .Cells.Count
          .Cells(sidxCurrentCell + 1).Copy Destination:=Worksheets(s_DestSheet).Range(s_DestRange)
      End With    
  
  End sub
  </code></pre>