Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Problem with PrintArea property

Hello All,

Thanks in advance for reading my post. I want to give users the
ability to print a certain range via a macro. After selecting teh
range, the user should be able to click one button to print (instead
of going through File-Print Area....).

I have a very simple VB macro for this. Problem is, everytime I run
it, I get get an error saying Object doesn't support the property.
Here's the code snippet. Any help will be greatly appreciated.


Public Sub AreaPrint()
ActiveSheet.PageSetup.PrintArea = _
ActiveWindow.Selection.Address

ActiveSheet.Selection.PrintPreview
Unload Me

End Sub


If I comment out the print preview part and print directly, it works
fine.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problem with PrintArea property

Selection.Printout

or

Selection.PrintPreview

--

Regards,
Tom Ogilvy


"Ugleeduck" wrote in message
om...
Hello All,

Thanks in advance for reading my post. I want to give users the
ability to print a certain range via a macro. After selecting teh
range, the user should be able to click one button to print (instead
of going through File-Print Area....).

I have a very simple VB macro for this. Problem is, everytime I run
it, I get get an error saying Object doesn't support the property.
Here's the code snippet. Any help will be greatly appreciated.


Public Sub AreaPrint()
ActiveSheet.PageSetup.PrintArea = _
ActiveWindow.Selection.Address

ActiveSheet.Selection.PrintPreview
Unload Me

End Sub


If I comment out the print preview part and print directly, it works
fine.



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
Problem using filter property ub Excel Worksheet Functions 8 October 17th 07 09:32 PM
Object property/method problem Ayo Excel Discussion (Misc queries) 6 August 30th 07 10:18 PM
PRINTAREA Giacomo[_3_] Excel Programming 4 October 28th 03 10:43 PM
copy printarea from more than 3 sheet & save in new book. Shital Excel Programming 1 October 4th 03 10:47 AM
Asking user to set a printarea when none is defined Michael J. Malinsky Excel Programming 0 July 23rd 03 06:34 PM


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