Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem using filter property | Excel Worksheet Functions | |||
Object property/method problem | Excel Discussion (Misc queries) | |||
PRINTAREA | Excel Programming | |||
copy printarea from more than 3 sheet & save in new book. | Excel Programming | |||
Asking user to set a printarea when none is defined | Excel Programming |