Thanks...the filtering works but I'm trying to create a form so the end users
does not have to use the filter function. I would like to have the filter
applied automatically when the end user prints the worksheet.
Any help/ideas would be appreciated.
Right-click on the Excel Icon left of "File" on menu bar.
Select "View Code"
Copy/paste this code into the module. Adjust the column(D) to suit.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim RngCol As Range
Dim i As Range
Set RngCol = Range("D1", Range("D" & Rows.Count). _
End(xlUp).Address)
For Each i In RngCol
If i.Value = 0 Then
i.EntireRow.Hidden = True
End If
Next i
End Sub
Gord
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.