Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting The Print-Area ? Robert11[_3_] New Users to Excel 2 May 31st 09 03:24 PM
Lock Print Setting Ted Excel Discussion (Misc queries) 3 September 4th 07 09:16 PM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Setting Print Areas Meredith Excel Discussion (Misc queries) 2 June 22nd 06 03:47 PM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"