S
Smonczka
I would like to print a sheet and a graph from a macro. I would like
to call both by the Number and not the Name of each. In other words if
the sheet was named Chart10 (BoxTops)I need to be able to call the
sheet by "Chart10" not "boxtops". This way if the name changes the
macro will still work.
Somthing like...
Sub test()
'
' test Macro
' Macro recorded 5/23/2005 by
'
'Print Chart
Sheets("chart12").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
But my macro errors out on the first line. How to you call a sheet by
the number not the name?
Thanks,
Steve
(e-mail address removed)
to call both by the Number and not the Name of each. In other words if
the sheet was named Chart10 (BoxTops)I need to be able to call the
sheet by "Chart10" not "boxtops". This way if the name changes the
macro will still work.
Somthing like...
Sub test()
'
' test Macro
' Macro recorded 5/23/2005 by
'
'Print Chart
Sheets("chart12").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
But my macro errors out on the first line. How to you call a sheet by
the number not the name?
Thanks,
Steve
(e-mail address removed)