Trevor3007
Well-known Member
- Joined
- Jan 26, 2017
- Messages
- 667
- Office Version
- 365
- Platform
- Windows
hi
i use the above, but would like to place a 'yes / no' to print or not & want it to print out landscapetoo..
can some kind person sort for me?
thank you.
VBA Code:
Sub rotasort()
'
' rotasort Macro
'
'
Columns("A:C").Select
Selection.EntireColumn.Hidden = True
Range("D3:AI21").Select
ActiveSheet.PageSetup.PrintArea = "$D$3:$AI$21"
Range("AK23").Select
Columns("D:D").ColumnWidth = 19.14
Columns("D:D").ColumnWidth = 17.57
Columns("D:D").ColumnWidth = 15
Columns("D:D").Select
With Selection
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("D3:AI22").Select
ActiveSheet.PageSetup.PrintArea = ""
ActiveSheet.PageSetup.PrintArea = "$D$3:$AI$22"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End Sub
i use the above, but would like to place a 'yes / no' to print or not & want it to print out landscapetoo..
can some kind person sort for me?
thank you.