This macro is to print a graph from a spreadsheet
Two things:-
even though I have set Screenupdate to false so it doesn't show selections etc, it still does - also see below
PrintArea is $A$2:$DW$57 but what if the area which has the range name of AM_Graph gets varied with an additional row - can I have the PrintArea also shown as AM_Graph?
When I go to print the data from two sheets - firstly Page 1 of Sheet 1, then all of Sheet 2 then page 2 of sheet 1, the screen flips back & forth between both sheets when I don't want it to.
Ron
Code:
Sub Print_Graph()
'
' Print_Graph Macro
'
' Application.ScreenUpdating = False
Application.Goto Reference:="AM_Graph"
ActiveSheet.PageSetup.PrintArea = "$A$2:$DW$57"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("A1").Select
Application.ScreenUpdating = True
End Sub
Two things:-
even though I have set Screenupdate to false so it doesn't show selections etc, it still does - also see below
PrintArea is $A$2:$DW$57 but what if the area which has the range name of AM_Graph gets varied with an additional row - can I have the PrintArea also shown as AM_Graph?
When I go to print the data from two sheets - firstly Page 1 of Sheet 1, then all of Sheet 2 then page 2 of sheet 1, the screen flips back & forth between both sheets when I don't want it to.
Ron