xlCellTypeBlank Problem

B

Bob

I am using this code to hide rows in column A. It will not hide a cell with a
link in it even if the cell is not showing any thing in it, is there a way
around this? What can be changed in the code?

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Production" Then
Cancel = True
Application.EnableEvents = False
Application.ScreenUpdating = False
With ActiveSheet
On Error Resume Next

..Range("A6:A2000").SpecialCells(xlCellTypeBlank).EntireRow.Hidden = True
.PrintOut

..Range("A6:A2000").SpecialCells(xlCellTypeBlank).EntireRow.Hidden = False
On Error GoTo 0
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub

Thank you

Bob
 

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.

Ask a Question

Top