xlCellTypeBlank Problem
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 |
xlCellTypeBlank Problem
Hi Bob
See my answer in your other thread -- Regards Ron de Bruin http://www.rondebruin.nl "Bob" wrote in message ... 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).E ntireRow.Hidden = True .PrintOut .Range("A6:A2000").SpecialCells(xlCellTypeBlank).E ntireRow.Hidden = False On Error GoTo 0 End With Application.EnableEvents = True Application.ScreenUpdating = True End If End Sub Thank you Bob |
All times are GMT +1. The time now is 06:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com