ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need print code please (https://www.excelbanter.com/excel-programming/277555-need-print-code-please.html)

Rodders[_2_]

Need print code please
 
Hi all

Could someone let me have some code to print a workbook down as far as the
last used row.

Thanks in advance



Rodders[_2_]

Need print code please
 
Thanks Tom - but I can't delete rows or columns - I guess maybe what I'm
trying to do is change the print area to go down only as far as a row with a
certain value in column A (for instance) and then print

Any ideas please?

Cheers


"Tom Ogilvy" wrote in message
...
Activesheet.printout

if that is giving you more than you want, then you need to clean up you
sheet by delete entirerows that are unused and entirecolumns that are
unused, then saving the workbook.

for example in the name box

101:65536<cr
Edit =Delete
N:IV<cr
Edit=Delete
file=Save



--
Regards,
Tom Ogilvy


Rodders wrote in message
...
Hi all

Could someone let me have some code to print a workbook down as far as

the
last used row.

Thanks in advance







Tom Ogilvy

Need print code please
 
ActiveSheet.PageSetup.PrintArea = Range(cells(1,1),Cells( _
rows.count,1).end(xlup)).Resize(,10).Address(exter nal:=True)
Activesheet.Printout

--
Regards,
Tom Ogilvy


Rodders wrote in message
...
Thanks Tom - but I can't delete rows or columns - I guess maybe what I'm
trying to do is change the print area to go down only as far as a row with

a
certain value in column A (for instance) and then print

Any ideas please?

Cheers


"Tom Ogilvy" wrote in message
...
Activesheet.printout

if that is giving you more than you want, then you need to clean up you
sheet by delete entirerows that are unused and entirecolumns that are
unused, then saving the workbook.

for example in the name box

101:65536<cr
Edit =Delete
N:IV<cr
Edit=Delete
file=Save



--
Regards,
Tom Ogilvy


Rodders wrote in message
...
Hi all

Could someone let me have some code to print a workbook down as far as

the
last used row.

Thanks in advance










All times are GMT +1. The time now is 02:36 PM.

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