First off, in your loop, you really need to define what sheet you are expecting to write to, as if the user clicks on another tab while the loop is running, it will be the active sheet. So, I guess the cut and paste from another solution still needs to be refined.
If you take a look at this:
You will find code that will do exactly what you are asking. Let Trowa know if you need help! :)