title: call function to each cell in a range (involve insert rows, so the range will change) in Excel VBA
body: <p>I'm learning VBA and have some problems</p>
  
  <p>What I have is a list of date:
  <a href="http://i.stack.imgur.com/WOal4.png" rel="nofollow">picture1</a></p>
  
  <p>What I want to do is add 3 meals for everyday like this
  <a href="http://i.stack.imgur.com/fCYei.png" rel="nofollow">picture2</a></p>
  
  <p>I have recorded a macro which can achieve this:</p>
  
  <pre><code>Sub InsertMeal()
      ActiveCell.EntireRow.Insert
      ActiveCell.EntireRow.Insert
      ActiveCell.Offset(0, 2).Select
      ActiveCell.FormulaR1C1 = "Breakfast"
      ActiveCell.Offset(1, 0).Select
      ActiveCell.FormulaR1C1 = "Lunch"
      ActiveCell.Offset(1, 0).Select
      ActiveCell.FormulaR1C1 = "Dinner"
      ActiveCell.Offset(-2, -2).Range("A1:A3").Select
      Selection.Merge
  End Sub
  </code></pre>
  
  <p>Now I want write a macro, which apply this InsertMeal() function to each cells in selected range.</p>
  
  <p>This is what I wrote</p>
  
  <pre><code>Sub ApplyToAll()
      For Each c In ActiveCell.CurrentRegion.Cells
          Call InsertMeal
          ActiveCell.Offset(1, 0).Select
      Next
  End Sub
  </code></pre>
  
  <p>The problem is, since I insert rows every time, the For loop doesn't work well. The loop never end. Now I don't know how to "keep the range" to make the loop work.</p>
  
  <p>Please help if you know how to do this. Thank you, really appreciate.</p>