Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using the following code to prevent the empty rows printing.
Private Sub Workbook_BeforePrint(Cancel As Boolean) If ActiveSheet.Name = "Initiatives" Then Cancel = True Application.EnableEvents = False Application.ScreenUpdating = False With ActiveSheet On Error Resume Next .Columns("A").SpecialCells(xlCellTypeBlanks).Entir eRow.Hidden = True .PrintOut .Columns("A").SpecialCells(xlCellTypeBlanks).Entir eRow.Hidden = False On Error GoTo 0 End With Application.EnableEvents = True Application.ScreenUpdating = True End If End Sub But, when I'm trying to use the code below to get a preprint report it's not working. ActiveWindow.SelectedSheets.PrintPreview Could anybody advise how I could make it's working? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PrintPreview | Excel Discussion (Misc queries) | |||
PrintPreview Zoom | Excel Programming | |||
PrintPreview doesn't work | Excel Programming | |||
PrintPreview Question | Excel Programming | |||
printpreview freezing | Excel Programming |