Want row to stay hidden
Hi David,
Perhaps something like this would work for you:
Sub Tester()
Dim Rng As Range, Rng2 As Range
Dim rCell As Range
Dim sh As Worksheet
Set sh = Sheets("Sheet1") ' <<===== Change
If Not sh.AutoFilterMode Then
Range("A1").AutoFilter ' <<===== Change?
End If
Set Rng2 = sh.AutoFilter.Range.Columns(1)
For Each rCell In Rng2.Cells
If rCell.EntireRow.Hidden Then
If Not Rng Is Nothing Then
Set Rng = Union(Rng, rCell)
Else
Set Rng = rCell
End If
End If
Next
Application.ScreenUpdating = False
'your filter code here
Rng.EntireRow.Hidden = True
Application.ScreenUpdating = True
End Sub
---
Regards,
Norman
"David" wrote in message
...
bhofsetz wrote
It appears that your Autofilter is causing the hidden lines to be
unhidden before faxing.
True
A possible workaound would be to have the code check which rows are
hidden before the autofilter is applied and then re-hide those rows
just before sending the fax.
That's what I'm seeking because I don't know how to code that.
--
David
|