ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting a range composed of current region + 2 rows (https://www.excelbanter.com/excel-programming/314827-selecting-range-composed-current-region-2-rows.html)

Bruce Roberson[_5_]

Selecting a range composed of current region + 2 rows
 
The range below selects a contigous region 3 rows below
the one cell range called "start". But what if I want the
print area to include not only that area, but I need it to
skip a blank line and then include the totals which reside
in the following row. I do not want to eliminate the blank
line to make this work.


Range("Start").Offset(3, 0).CurrentRegion.PrintPreview

I should know how to do this by now, but I it is late in
the day and I am stuck at the moment.

Thanks,


Bruce

Bob Phillips[_6_]

Selecting a range composed of current region + 2 rows
 
Hi Bruce,

one way

Dim oRng As Range

Set oRng = Range("Start").Offset(3, 0).CurrentRegion
oRng.Resize(oRng.rows.Count + 2, oRng.columns.Count).PrintPreview

--

HTH

RP

"Bruce Roberson" wrote in message
...
The range below selects a contigous region 3 rows below
the one cell range called "start". But what if I want the
print area to include not only that area, but I need it to
skip a blank line and then include the totals which reside
in the following row. I do not want to eliminate the blank
line to make this work.


Range("Start").Offset(3, 0).CurrentRegion.PrintPreview

I should know how to do this by now, but I it is late in
the day and I am stuck at the moment.

Thanks,


Bruce




No Name

Selecting a range composed of current region + 2 rows
 
Very good Bob, thanks once again.


Bruce
-----Original Message-----
Hi Bruce,

one way

Dim oRng As Range

Set oRng = Range("Start").Offset(3, 0).CurrentRegion
oRng.Resize(oRng.rows.Count + 2,

oRng.columns.Count).PrintPreview

--

HTH

RP

"Bruce Roberson"

wrote in message
...
The range below selects a contigous region 3 rows below
the one cell range called "start". But what if I want

the
print area to include not only that area, but I need it

to
skip a blank line and then include the totals which

reside
in the following row. I do not want to eliminate the

blank
line to make this work.


Range("Start").Offset(3, 0).CurrentRegion.PrintPreview

I should know how to do this by now, but I it is late in
the day and I am stuck at the moment.

Thanks,


Bruce



.



All times are GMT +1. The time now is 11:58 AM.

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