ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing named areas in Excel 2003 (https://www.excelbanter.com/excel-discussion-misc-queries/132491-printing-named-areas-excel-2003-a.html)

Max

Printing named areas in Excel 2003
 
I have a number of cell areas on a number of sheets but within the same
workbook which have been named. I wish to print all the defined/named areas
as a report but cannot find a command to do it.
What's the best way to try?

Thanks for reading this

Gary''s Student

Printing named areas in Excel 2003
 
To print a report with one page for each Named Range, try:

Sub pprint()
For Each n In Names
ActiveSheet.PageSetup.PrintArea = n.Name
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub
--
Gary's Student
gsnu200708


"Max" wrote:

I have a number of cell areas on a number of sheets but within the same
workbook which have been named. I wish to print all the defined/named areas
as a report but cannot find a command to do it.
What's the best way to try?

Thanks for reading this


Max

Printing named areas in Excel 2003
 
Thank you for this , I assume this means that Excel cannot do it natively. I
seem to recall an earlier version did.
I do not know what to do with this code fragment. I can see it's designed to
be run as a little subroutine but don't know where to start.

Sub pprint()
For Each n In Names
ActiveSheet.PageSetup.PrintArea = n.Name
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub



Gary''s Student

Printing named areas in Excel 2003
 
Macros are very easy to install and use:


1. CNTRL-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window


If you save the workbook, the macro will be saved with it.

To run the macro, from the Excel window:
1. touch ALT-F8
2. select the macro
3. touch run


To remove the macro:


1. bring up the VBE window as above
2. clear the code out
3. close the VBE window


To learn more about macros in general, see:


http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you have concerns, copy the workbook and try it out on the copy. If you
need more help, just update this post.

--
Gary's Student
gsnu200708


"Max" wrote:

Thank you for this , I assume this means that Excel cannot do it natively. I
seem to recall an earlier version did.
I do not know what to do with this code fragment. I can see it's designed to
be run as a little subroutine but don't know where to start.

Sub pprint()
For Each n In Names
ActiveSheet.PageSetup.PrintArea = n.Name
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub



Max

Printing named areas in Excel 2003
 
Found the macro/vb editor in the end under tools

pasted the stuff in ran it and got a this error 1004
"unable to set the print area property of the page setup class"

sorry to be a plonker - i'm sure tjhis must be simple really!


"Gary''s Student" wrote:

Macros are very easy to install and use:


1. CNTRL-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window


If you save the workbook, the macro will be saved with it.

To run the macro, from the Excel window:
1. touch ALT-F8
2. select the macro
3. touch run


To remove the macro:


1. bring up the VBE window as above
2. clear the code out
3. close the VBE window


To learn more about macros in general, see:


http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you have concerns, copy the workbook and try it out on the copy. If you
need more help, just update this post.

--
Gary's Student
gsnu200708


"Max" wrote:

Thank you for this , I assume this means that Excel cannot do it natively. I
seem to recall an earlier version did.
I do not know what to do with this code fragment. I can see it's designed to
be run as a little subroutine but don't know where to start.

Sub pprint()
For Each n In Names
ActiveSheet.PageSetup.PrintArea = n.Name
ActiveWindow.SelectedSheets.PrintOut
Next
End Sub




All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com