Could someone tell me why this is not printing.
Private Sub Command1_Click()
Dim O As Object
Set O = CreateObject("excel.application")
O.Visible = True
O.DisplayAlerts = False
O.Workbooks.Open App.Path & "\Invoice.xls"
O.ActiveWorkbook.SaveAs App.Path & "\New Workbook.xls"
O.Range("B3").Value = "test"
O.ActiveWindow.Sheet1.PrintOut Copies:=1
O.ActiveWorkbook.Close Savechanges:=False
O.Quit
I get an error on this line:
O.ActiveWindow.Sheet1.PrintOut Copies:=1
Any Help?
JO


Reply With Quote
.