Print areas

  • Thread starter Thread starter robert_woodie
  • Start date Start date
R

robert_woodie

Is there any way of setting the print area to cloumn A,C and D,
therefore missing out coloumn B. whatever i do it puts coloumn A on
page 1 and the rest on page 2

Is this possible?

Robert
 
Yes, it's possible, as you've discovered - but each area
(non-contiguous range) in PrintArea will print on a different sheet.

You can set the print area to A:D and hide column B to achieve the
effect you want.

To automate it, put something like this in your ThisWorkbook code
module (right-click on the workbook titlebar and choose View Code):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Application.EnableEvents = False
Cancel = True
For Each wkSht In ActiveWindow.SelectedSheets
If wkSht.Name = "Sheet1" Then
With wkSht
.PageSetup.PrintArea = "A:D"
.Columns(2).Hidden = True
.PrintOut
.Columns(2).Hidden = False
End With
Else
wkSht.PrintOut
End If
Next wkSht
Application.EnableEvents = True
End Sub
 
Back
Top