View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
igbert igbert is offline
external usenet poster
 
Posts: 44
Default suppress printing on certain rows

Hi Ron De Bruin,

I have used your Macros in Excel 2007 to supress printing of certain Rows

Private Sub Workbook_BeforePrint(Cancel As Boolean)

' Hide Row 1 to Row 5 when printing

If ActiveSheet.Name = "Adjustment" Then
Cancel = True
Application.EnableEvents = False
Application.ScreenUpdating = False
With ActiveSheet
.Rows("1:5").EntireRow.Hidden = True
.PrintOut
.Rows("1:5").EntireRow.Hidden = False
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub

However, after I clicked "Print Preview", all toolbar icons are disable for
selection.

When I take out the above Macro, selection becomes available.

Could you show me how to fix it.

Thanks.

Igbert Au-Yeung

"Ron de Bruin" wrote:

I have a few code examples here
http://www.rondebruin.nl/print.htm

See the macro "Sub Hide_Print_Unhide()"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Valerie" wrote in message ...
Someone other than myself will be working in the spreadsheet. They have
limited ability and will basically be performing data entry and printing
only. There are about 500 rows in the spreadsheet. At any point in time
there may only be 25 rows with values scattered throughout the spreadsheet
that she would want to print.

I want her to be able to see all of the rows, yet only print those with
values. I don't want her to have to hunt & peck for the rows with values.
What would the easiest solution be?
--
Valerie


"Kevin B" wrote:

You can hide the rows without values and then print
--
Kevin Backmann


"Valerie" wrote:

How do I suppress the printing of certain rows in a spreadsheet? If there is
not a value in a particular cell in the row I do not want the row to print.
--
Valerie