already
Board Regular
- Joined
- Nov 11, 2008
- Messages
- 179
Hello
I want to hide rows with empty data in a column (D) but only in a specific part(range A11:D39) of the worksheet before printing. I though that following part of code could do the job but I'm wrong
With ActiveSheet
On Error Resume Next
Set rng = Sheets("Sheet1").Range("A11:D39")
.Columns("d").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
.PrintOut
.Columns("d").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
On Error GoTo 0
End With
Any help will be appreciated
kind regards
Al
I want to hide rows with empty data in a column (D) but only in a specific part(range A11:D39) of the worksheet before printing. I though that following part of code could do the job but I'm wrong
With ActiveSheet
On Error Resume Next
Set rng = Sheets("Sheet1").Range("A11:D39")
.Columns("d").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
.PrintOut
.Columns("d").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
On Error GoTo 0
End With
Any help will be appreciated
kind regards
Al