PC Review


Reply
Thread Tools Rate Thread

dyamic printing

 
 
hurlbut777
Guest
Posts: n/a
 
      10th Sep 2008
I have a spreadsheet with 10,000 rows available for entry. I would like to
create a print macro that would only print down to the last row that actually
had data instead of printing 1 billion pages of blank rows.

I need to know if this is possible using vba, and if so, what would the code
look like...not looking for alternative solutions.

Thanks,
Jeff
 
Reply With Quote
 
 
 
 
NOPIK
Guest
Posts: n/a
 
      10th Sep 2008
On Sep 10, 7:55*pm, hurlbut777 <hurlbut...@discussions.microsoft.com>
wrote:
> I have a spreadsheet with 10,000 rows available for entry. *I would like to
> create a print macro that would only print down to the last row that actually
> had data instead of printing 1 billion pages of blank rows.
>
> I need to know if this is possible using vba, and if so, what would the code
> look like...not looking for alternative solutions.
>
> Thanks,
> Jeff


Setup PrintArea as described in following post
ActiveSheet.PageSetup.PrintArea = "1:100"
ActiveSheet.PrintOut
 
Reply With Quote
 
Office_Novice
Guest
Posts: n/a
 
      10th Sep 2008
Option Explicit
Sub PrintYourRange()
Dim LastRow As Long
Dim YourRange As Range
LastRow = ActiveWorkbook.Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row
Set YourRange = Range("A1: I" & LastRow)
YourRange.Select
Selection.PrintOut
End Sub

"NOPIK" wrote:

> On Sep 10, 7:55 pm, hurlbut777 <hurlbut...@discussions.microsoft.com>
> wrote:
> > I have a spreadsheet with 10,000 rows available for entry. I would like to
> > create a print macro that would only print down to the last row that actually
> > had data instead of printing 1 billion pages of blank rows.
> >
> > I need to know if this is possible using vba, and if so, what would the code
> > look like...not looking for alternative solutions.
> >
> > Thanks,
> > Jeff

>
> Setup PrintArea as described in following post
> ActiveSheet.PageSetup.PrintArea = "1:100"
> ActiveSheet.PrintOut
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot convert to dyamic disk. =?Utf-8?B?YnJvZG8=?= Windows Vista Hardware 1 12th Mar 2007 05:14 AM
Dyamic Ranges =?Utf-8?B?QW5keQ==?= Microsoft Excel Programming 4 8th Feb 2006 12:56 AM
Panel - Dyamic Controls asadikhan@hotmail.com Microsoft ASP .NET 1 22nd Feb 2005 04:25 PM
Dyamic ranges (?) Elijah Microsoft Excel Charting 1 23rd Jul 2004 01:49 PM
Dyamic Text Based On Section Titles Thomas Schemmer [ ZaxisNet - Creative Media ] Microsoft Word New Users 1 18th Oct 2003 10:15 PM


Features
 

Advertising
 

Newsgroups
 


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