i currently use this VBA
to print my chart, but i will like it to change orientation to Landscape. i ammended it toPHP Code:
Sub printChart()
Range("AV41").Select
Do
Range("R6").Formula = ActiveCell.Value
Sheets("ConsultantTrends").Activate
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell) = True
End Sub
but it still printed in portrait.... did i do wrong?PHP Code:
Sub printChart()
Range("AV41").Select
Do
Range("R6").Formula = ActiveCell.Value
Sheets("ConsultantTrends").Activate
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell) = True
End Sub
Bookmarks