Ok, here goes. You have to define a (large?) number of checkboxes, and align them carefully within the row that they apply to.
Each is associated with a cell to hold the current value. For simplicty, I will use column B but it could be well off screen in a high column outside the print area. Now you don't absolutely need a macro when running, but users are simple creatures so we write code in the before_print event to handle it for them.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Columns("B:B").Select
If Not AutoFilterMode Then Cells.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="TRUE"
ActiveWindow.SelectedSheets.PrintOut
Selection.AutoFilter Field:=1, Criteria1:="TRUE"
Cancel = True ' we printed: stop excel doing so
End Sub
I guess you've lots of lines needing a checkbox. They are easy to create but hard to position and associate. If only we could write a loop, but that's object model again.
Bookmarks