title: How to keep a log of usage of a macro
body: <p>I have a rather silly problem. I have a macro (linked to a button) which copies cells A1:A2 from one worksheet (namedFP) to another worksheet (Log). I intend to copy these 2 cells on the log sheet every time I hit the macro button. The problem I am facing right now is that when I use the button multiple times, these cells are getting copied over each other instead of using the next available row to paste the cells.  </p>
  
  <p>This is what I have now, and I tried changing the 'Rowcount+1' to 'RowCount+2' but that did not work. Any help is appreciated. </p>
  
  <pre><code>DHRSheet.Select
   Range("A1:A2").Select
   Selection.Copy
  
   LogSheet.Select
   RowCount = LogSheet.UsedRange.Rows.Count
   Dim r As Integer
   r = RowCount + 1
   Dim infocell As Range
   Set infocell = Cells(r, 1)
   infocell.Select
   ActiveSheet.Paste
   infocell.Value = DHRSheet.Name &amp; "$" &amp; infocell.Value
  
   DHRSheet.Select
   ActiveWorkbook.Save
  </code></pre>