New page for each record?

bluedogz

New Member
Joined
Aug 16, 2024
Messages
4
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
Good evening!

I've been tasked with updating a roster to allow recordkeeping of a group.

Specifically, a user will enter a roster of 0-38 records,1 record per row, each row containing fields [FIRSTNAME],[LASTINITIAL],[ROOMNUMBER], and a Y/N checkbox.

From that, I need to generate printed output of each record/row on a separate printed page. I want to also assure I only print as many pages as there are records; the number of records varies day-to-day. Each printed page will then be used for handwritten note-taking later.

I'm kind of stymied on this one. Any guidance?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Select the rows then run this :
VBA Code:
Sub v()
Dim r%
With ActiveSheet
    For r = 1 To .Selection.EntireRow.Rows.Count
        .PageSetup.PrintArea = Selection(r).EntireRow.Address
        .PrintOut
    Next
    .PageSetup.PrintArea = ""
End With
End Sub
 
Upvote 0
Select the rows then run this :
VBA Code:
Sub v()
Dim r%
With ActiveSheet
    For r = 1 To .Selection.EntireRow.Rows.Count
        .PageSetup.PrintArea = Selection(r).EntireRow.Address
        .PrintOut
    Next
    .PageSetup.PrintArea = ""
End With
End Sub
Very helpful!

Now, this needs to be set up so that each day, a person (not me) fills in the roster, and then prints the resulting pages I described. Thus, selecting rows and running a script isn't in the cards. Ultimately, I want to simply fill in the rows of the roster, click "Print entire workbook," and be done with it.
 
Upvote 0
What is the first column with data?
"Print entire workbook" - what does this mean? Is there more than one sheet to print?
 
Upvote 0
What is the first column with data?
"Print entire workbook" - what does this mean? Is there more than one sheet to print?
As of now, the dates will have 0-38 rows, and 4 columns ( [FIRSTNAME],[LASTINITIAL],[ROOMNUMBER], and a Y/N checkbox).
As of now, column A is headed FIRSTNAME but that can be adjusted as necessary.

There is not more than one sheet- sorry, I misspoke.
 
Upvote 0
VBA Code:
Sub v()
Dim rng As Range, r%
Set rng = Range([A2], Cells(Rows.Count, "A").End(3))
For r = 1 To rng.Rows.Count
    PageSetup.PrintArea = rng(r).EntireRow.Address
    PrintOut
Next
PageSetup.PrintArea = ""
End Sub
 
Upvote 0
VBA Code:
Sub v()
Dim rng As Range, r%
Set rng = Range([A2], Cells(Rows.Count, "A").End(3))
For r = 1 To rng.EntireRow.Rows.Count
    PageSetup.PrintArea = rng(r).EntireRow.Address
    PrintOut
Next
PageSetup.PrintArea = ""
End Sub
As I read, the user will still have to select the rows and then run this script. This is useful, but the goal is to simply fill in the roster and have subsequent pages auto-populate with the relevant records. The user base doesn't have the skill nor inclination to run scripts.
 
Upvote 0
As I read, the user will still have to select the rows and then run this script. This is useful, but the goal is to simply fill in the roster and have subsequent pages auto-populate with the relevant records. The user base doesn't have the skill nor inclination to run scripts.
The user does not have to select the data. Put a button on the sheet and assign the macro.

If you want, can add a message box to ask the user whether he wants to print when the button clicked.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top