![]() |
Reports from rows
I need to send one row at a time (or multiple selected rows), on command via
a button, to a printed, one record per page, report. I can send the record to another worksheet or a Word document. What is the best way to accomplish this? I am limited to working in Excel 97. Thanks in advance. |
If you're printing the report, maybe just applying data|filter autofilter and
going through each unique entry would be sufficient (then print). Or just keep the headers(???), hide everything but the first data line, print, hide everything but the second, print. and so forth then show everything to make it back to normal. Option Explicit Sub testme() Dim LastRow As Long Dim FirstRow As Long Dim iRow As Long With Worksheets("sheet1") FirstRow = 2 'headers in 1 LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = FirstRow To LastRow .Range(.Rows(FirstRow), .Rows(LastRow)).Hidden = True .Rows(iRow).Hidden = False .PrintOut preview:=True Next iRow .Rows.Hidden = False End With End Sub I used preview:=true to save some trees. braindead wrote: I need to send one row at a time (or multiple selected rows), on command via a button, to a printed, one record per page, report. I can send the record to another worksheet or a Word document. What is the best way to accomplish this? I am limited to working in Excel 97. Thanks in advance. -- Dave Peterson |
All times are GMT +1. The time now is 12:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com