Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Print Area


Hello

I have read through various threads and found what I need but canno
pull it together due to inexperience.

I am trying set up the print area to adjust according to the number o
rows in a sheet. The rows change depending on what the sheet use
selects but the columns always stay constant. I have looked a
usedrange however it picks up the formatted cells so prints blan
pages.

Is there a way that I can add a count into the string below??
In the active sheet that I am printing there is an index in column
that I could search for the last entry and add 3 rows which would the
print everything. However there are blanks within column d

ActiveSheet.PageSetup.PrintArea = "$b$3$am$" & countsomething & ""


Any help appreciate

--
Kstalke
-----------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...fo&userid=2469
View this thread: http://www.excelforum.com/showthread.php?threadid=57125

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Auto Print Area

To find the last cell with data in a column, start at the bottom of the
column and look up...

Dim lngRow as Long
lngRow = ActiveSheet.Cells(Rows.Count, 4).End(xlUp).Row
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Kstalker"
wrote in message
Hello
I have read through various threads and found what I need but cannot
pull it together due to inexperience.

I am trying set up the print area to adjust according to the number of
rows in a sheet. The rows change depending on what the sheet user
selects but the columns always stay constant. I have looked at
usedrange however it picks up the formatted cells so prints blank
pages.

Is there a way that I can add a count into the string below??
In the active sheet that I am printing there is an index in column d
that I could search for the last entry and add 3 rows which would then
print everything. However there are blanks within column d

ActiveSheet.PageSetup.PrintArea = "$b$3$am$" & countsomething & ""
Any help appreciated
--
Kstalker

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Print Area


cheers Jim


--
Kstalker
------------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...o&userid=24699
View this thread: http://www.excelforum.com/showthread...hreadid=571255

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
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
auto scale print area Jase Excel Discussion (Misc queries) 3 July 13th 09 09:01 PM
How do I set Auto Print Area? Need Help on axis problem in a chart[_2_] Excel Worksheet Functions 7 September 27th 08 05:46 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM
Auto Set Print Area RD Wirr Excel Programming 7 August 11th 05 04:50 PM


All times are GMT +1. The time now is 03:26 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"