Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
auto scale print area | Excel Discussion (Misc queries) | |||
How do I set Auto Print Area? | Excel Worksheet Functions | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) | |||
Auto Set Print Area | Excel Programming |