Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting printarea through range object

Hi,

I have a worksheet in which I have hidden all of the empty rows. Now
want to print the visible rows, but I don't seem to be able to.

I prefer selecting the rows and storing them in a range object, afte
which I can set the range object as the printarea. Can this be done an
if so, what code should I use?

Yours truly,

Berend Botj

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting printarea through range object

Doesn't anybody know how to do this

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Setting printarea through range object

Hi Berend.

I have a worksheet in which I have hidden all of the empty rows. Now I
want to print the visible rows, but I don't seem to be able to.


Hidden rows do *not* print so you should have no problem.

I prefer selecting the rows and storing them in a range object, after
which I can set the range object as the printarea. Can this be done and
if so, what code should I use?


Certainly. For example:

Sub SetPrintArea()
Dim Rng As Range
' Set your range to suit
Set Rng = Range("A1:H3,A24:H25")
ActiveSheet.PageSetup.PrintArea = Rng.Address
End Sub

---
Regards,
Norman



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting printarea through range object

First of all, thanks for reacting.

Can I do the range thing with R1C1 coordinates? I can't get it to wor
properly with multiple range selections. For example I want to selec
columns 1 through AK of rows 1 through 200 and 250 through 400. How ca
I do this

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Setting printarea through range object

Hi Berend,

Try:

Set rng = Range("A1:AK200,A250:AK400")


---
Regards,
Norman


"Berend Botje " wrote in
message ...
First of all, thanks for reacting.

Can I do the range thing with R1C1 coordinates? I can't get it to work
properly with multiple range selections. For example I want to select
columns 1 through AK of rows 1 through 200 and 250 through 400. How can
I do this?


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting printarea through range object

Setting a multirange printarea will result in multiple print jobs. Since
you are hiding the rows you don't want to print, you should set the print
area to one contiguous range and hide the rows you don't want printed --
unless you want multiple print jobs.

--
Regards,
Tom Ogilvy

"Berend Botje " wrote in
message ...
First of all, thanks for reacting.

Can I do the range thing with R1C1 coordinates? I can't get it to work
properly with multiple range selections. For example I want to select
columns 1 through AK of rows 1 through 200 and 250 through 400. How can
I do this?


---
Message posted from http://www.ExcelForum.com/



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting printarea through range object

I found the problem.... I want to print the first 8 rows on every page
That is why all rows (including the hidden ones) are printed. Since
have over 10000 rows, this is most unwanted. Does anyone know how t
solve this

--
Message posted from http://www.ExcelForum.com

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting printarea through range object

I couldn't reproduce that using Rows to Repeat at top. If I had hidden rows
in the specified rows, they were not printed.

--
Regards,
Tom Ogilvy

"Berend Botje " wrote in
message ...
I found the problem.... I want to print the first 8 rows on every page.
That is why all rows (including the hidden ones) are printed. Since I
have over 10000 rows, this is most unwanted. Does anyone know how to
solve this?


---
Message posted from http://www.ExcelForum.com/



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Setting printarea through range object

I've never seen hidden rows print.

But if I added manual page breaks, I could see the rows to repeat at top show up
for those pages that have nothing but hidden rows.

I'd either remove the manual page breaks or copy the worksheet and delete the
hidden rows (and print from there).



"Berend Botje <" wrote:

I found the problem.... I want to print the first 8 rows on every page.
That is why all rows (including the hidden ones) are printed. Since I
have over 10000 rows, this is most unwanted. Does anyone know how to
solve this?

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Setting PrintArea by using Named Ranges Oren Klaber Excel Programming 2 January 30th 04 10:34 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 08:17 AM.

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

About Us

"It's about Microsoft Excel"