Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Set PrintArea Not Working

What are the problems here?

The first gets an error on execution: "Unable to set the PrintArea
property of the PageSetup class"
1). ActiveSheet.PageSetup.PrintArea = Range(Cells(LastRow - 24, 1),
Cells(LastRow + 1, 12))

The second just doesn't work (doesn't set the PrintArea to the range in
question).
2. Range(Cells(LastRow - 24, 1), Cells(LastRow + 1, 12)).Select
ActiveSheet.PageSetup.PrintArea =
ActiveCell.CurrentRegion.Address

Can someone provide an answer to both questions?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Set PrintArea Not Working

the Printarea property requires a "String" data type,
the address property returns a string..

example:
ActiveSheet.PageSetup.PrintArea = Range(Cells(3, 2), Cells(8,
4)).Address



"bw" wrote in message
:

What are the problems here?

The first gets an error on execution: "Unable to set the PrintArea
property of the PageSetup class"
1). ActiveSheet.PageSetup.PrintArea = Range(Cells(LastRow - 24, 1),
Cells(LastRow + 1, 12))

The second just doesn't work (doesn't set the PrintArea to the range in
question).
2. Range(Cells(LastRow - 24, 1), Cells(LastRow + 1, 12)).Select
ActiveSheet.PageSetup.PrintArea =
ActiveCell.CurrentRegion.Address

Can someone provide an answer to both questions?


  #3   Report Post  
Posted to microsoft.public.excel.programming
bw bw is offline
external usenet poster
 
Posts: 74
Default Set PrintArea Not Working

Thank you sir!
That fixed the problem.
Bernie



"JMay" wrote in message
...
the Printarea property requires a "String" data type,
the address property returns a string..

example:
ActiveSheet.PageSetup.PrintArea = Range(Cells(3, 2), Cells(8,
4)).Address



"bw" wrote in message
:

What are the problems here?

The first gets an error on execution: "Unable to set the PrintArea
property of the PageSetup class"
1). ActiveSheet.PageSetup.PrintArea = Range(Cells(LastRow - 24,
1),
Cells(LastRow + 1, 12))

The second just doesn't work (doesn't set the PrintArea to the range
in
question).
2. Range(Cells(LastRow - 24, 1), Cells(LastRow + 1, 12)).Select
ActiveSheet.PageSetup.PrintArea =
ActiveCell.CurrentRegion.Address

Can someone provide an answer to both questions?



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
PrintArea [email protected] Excel Programming 4 July 23rd 05 12:45 AM
PrintArea setting nope Excel Programming 0 January 11th 05 03:14 AM
PrintArea rickey24[_18_] Excel Programming 1 October 7th 04 01:48 PM
PrintArea rickey24[_17_] Excel Programming 1 October 6th 04 08:04 PM
PRINTAREA Giacomo[_3_] Excel Programming 4 October 28th 03 10:43 PM


All times are GMT +1. The time now is 03:06 PM.

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"