Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Print range
If you don't set the printarea, then excel will just print the used area.
the message depends on the security setting. If you want to increase the chances of opening a document with a virus, you can lower the security setting and not be prompted. This has to be done by each individual user. Regards, Tom Ogilvy "Brad E" wrote in message ... I am creating a worksheet where the number of entries can be anywhere from 1 - 200. Each entry is on a new row. I don't want to set the print range to print all 200 rows before I save this spreadsheet for the rest of the department to use. If a user has only entered three lines of data, there is no reason to waste paper by printing all 200 lines. Is there a macro I could use to define the print range? Also, if I enter a macro, is there any way to open the workbook without having to click "yes: after the message, "This document contains macros, do you want to continue?" Thanks, Brad E. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Print range
Thanks Tom.
I forgot one thing though: I have a protected SUM formula in the last column to keep a running sum as data is entered. =IF(data is entered in column A, SUM, ""). So upon printing, Excel prints all 200 lines thinking the "" is printable. -----Original Message----- If you don't set the printarea, then excel will just print the used area. the message depends on the security setting. If you want to increase the chances of opening a document with a virus, you can lower the security setting and not be prompted. This has to be done by each individual user. Regards, Tom Ogilvy "Brad E" wrote in message ... I am creating a worksheet where the number of entries can be anywhere from 1 - 200. Each entry is on a new row. I don't want to set the print range to print all 200 rows before I save this spreadsheet for the rest of the department to use. If a user has only entered three lines of data, there is no reason to waste paper by printing all 200 lines. Is there a macro I could use to define the print range? Also, if I enter a macro, is there any way to open the workbook without having to click "yes: after the message, "This document contains macros, do you want to continue?" Thanks, Brad E. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Print range
ActiveSheet.PageSetup.PrintArea = _
Range("A1").CurrentRegion.Address(external:=true) Put it in the BeforePrint event. Regards, Tom Ogilvy Brad E wrote in message ... Thanks Tom. I forgot one thing though: I have a protected SUM formula in the last column to keep a running sum as data is entered. =IF(data is entered in column A, SUM, ""). So upon printing, Excel prints all 200 lines thinking the "" is printable. -----Original Message----- If you don't set the printarea, then excel will just print the used area. the message depends on the security setting. If you want to increase the chances of opening a document with a virus, you can lower the security setting and not be prompted. This has to be done by each individual user. Regards, Tom Ogilvy "Brad E" wrote in message ... I am creating a worksheet where the number of entries can be anywhere from 1 - 200. Each entry is on a new row. I don't want to set the print range to print all 200 rows before I save this spreadsheet for the rest of the department to use. If a user has only entered three lines of data, there is no reason to waste paper by printing all 200 lines. Is there a macro I could use to define the print range? Also, if I enter a macro, is there any way to open the workbook without having to click "yes: after the message, "This document contains macros, do you want to continue?" Thanks, Brad E. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Print range
Set your print area to include only the cells to be printed. To do this from code, look up
PrintArea in VBA Help. There are examples. On Thu, 24 Jul 2003 11:19:17 -0700, "Brad E" wrote: Thanks Tom. I forgot one thing though: I have a protected SUM formula in the last column to keep a running sum as data is entered. =IF(data is entered in column A, SUM, ""). So upon printing, Excel prints all 200 lines thinking the "" is printable. -----Original Message----- If you don't set the printarea, then excel will just print the used area. the message depends on the security setting. If you want to increase the chances of opening a document with a virus, you can lower the security setting and not be prompted. This has to be done by each individual user. Regards, Tom Ogilvy "Brad E" wrote in message ... I am creating a worksheet where the number of entries can be anywhere from 1 - 200. Each entry is on a new row. I don't want to set the print range to print all 200 rows before I save this spreadsheet for the rest of the department to use. If a user has only entered three lines of data, there is no reason to waste paper by printing all 200 lines. Is there a macro I could use to define the print range? Also, if I enter a macro, is there any way to open the workbook without having to click "yes: after the message, "This document contains macros, do you want to continue?" Thanks, Brad E. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting The Print-Area ? | New Users to Excel | |||
Lock Print Setting | Excel Discussion (Misc queries) | |||
Setting the print area in page set up to print 1 page wide by 2 pages tall | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Setting Print Areas | Excel Discussion (Misc queries) |