I'm not clear on what your problem is, based on reading the title and then reading the second line of your post. It only prints the first record the correct amount of times when invoked by a button, but prints all records the correct amount of times if executed from VBA?
What module is this code in?
Where is the button?
One thing that jumps out right away are these unqualified Range references:
What worksheet do you intend these to refer to?
If the code is in a worksheet module (like Sheet1), these ranges will refer to that worksheet.
If the code is in a standard module (like Module1), these ranges will refer to the active worksheet.
It is generally weak to depend on what sheet is active for references, unless you have a macro that is designed to be called from different sheets.
I do not know what sheet you actually want them to refer to so I can't tell you if this is code is causing your problem, or if it is, how to fix it. However, all your other code provides explicit qualifications, like this, which is a best practice:
Bookmarks