LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to define a print range?


I have a worksheet that a user enters data starting at "A7". For each
input row he fills columns "A" thru "G". He then presses a
commandbutton to calculate columns "I" thru "N" for each entry.

I clear the area A7:BB500, knowing there won't be more than 150 rows
at any one time. Now I'm planning to provide a commandbutton to print
the keyed-in data and calculated results. If the user only enters say
15 rows of data, does the calculation and goes to print. It prints
many blank pages after the data. I'm assuming the print settings say
to print thru range BB500 or at least BBxx. (xx=last row)

How do I get only the entire range of data entered/calced (a7:n22) to
be printed? Please show in code.

Starting range is "A7". Ending row is retrieved using "xlup". I know
last column to be printed is "N".

Dim StartRange as Range
Dim LastRow as Long
Dim LastCol as String

LastCol = "N"
Set StartRange = Range("A7")
LastRow = ActiveSheet.Cells(65535, 3).End(xlUp).Row

Now, how do I assemble all this information and place into the print
area range?????


tt

 
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
Define Name range Gotroots Excel Discussion (Misc queries) 10 December 19th 09 11:30 AM
Define a range jlclyde Excel Discussion (Misc queries) 2 April 17th 08 08:26 PM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM
Define a range globally Debbie[_7_] Excel Programming 2 December 24th 03 01:13 AM
Highlighting a Block of Cells to Define the Print Area Mark[_22_] Excel Programming 8 November 18th 03 03:43 AM


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

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

About Us

"It's about Microsoft Excel"