Can I print different areas of a spreadsheet using CommandButtons

  • Thread starter Thread starter Guy B Machan
  • Start date Start date
G

Guy B Machan

I would like to set up a workbook with the first spreadsheet containing a
series of commandbuttons, set into a calendar, that enables the user to print
out information contained in other spreadsheets.
I can set up the commandbutton to do this for one spreadsheet but as there
will be many different prints this would mean many different spreadsheets.
I wanted to know that if I created several named areas in one spreadsheet
whether I could get the commandbutton to print off a named area using the
commandbutton macro. Or is there another solution?
 
Call this routine for each name on each sheet:

Sub PrintNamedRange(sSheet As String, sRange As String)
Worksheets(sSheet).Range(sRange).Name = "'" & sSheet & "'!Print_Area"
Worksheets(sSheet).PrintOut
End Sub

- Jon
 
Back
Top