Macro to delete columns and set print area

  • Thread starter Thread starter twaccess
  • Start date Start date
T

twaccess

Does anyone have a macro that can delete a pre-set series of columns an
then set the page setup to print 1 page wide in Landscape format pleas
?

I.e. Delete columns b,c,d and f, then page setup to print 1 page wid
in landscape format.

I have a daily report which contains a number of columns which I don
need and I delete them normally before printing the report off to fi
to at least 1 page wide. The number of pages high is dependant on ho
long the report is
 
Sub test()
Range("B:B,C:C,D:D,F:F").Delete xlShiftToLeft
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
 
Thanks very much for this Rob. It is much appreciated and will make m
daily life easier.

There is another bit of finesse though. What would the coding be t
autofit the column widths to the text as well please ?

Thanks

T
 
Back
Top