Posted to microsoft.public.excel.programming
|
|
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.
|