Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? | Excel Discussion (Misc queries) | |||
Printing multiple worksheet areas in a single page | Excel Worksheet Functions | |||
Excel 2003 Printing | Excel Discussion (Misc queries) | |||
Printing multiple areas on the 1 page | Excel Discussion (Misc queries) | |||
printing from different areas | Excel Worksheet Functions |