Problem with PrintArea property

  • Thread starter Thread starter Ugleeduck
  • Start date Start date
U

Ugleeduck

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.
 
Back
Top