PSS ID Number: 132219
Article Last Modified on 7/10/2001
Sub Test_Print()
Dim LibPath As String
' Record the path to the Excel Libraries
LibPath = Application.LibraryPath & "\REPORTS.XLA"
' Open the REPORTS.XLA file.
Workbooks.Open(Filename:=LibPath).RunAutoMacros _
Which:=xlAutoOpen
' Set up an "OnTime macro that will run the
' "Print_Report" macro as soon as the
' "Test_Print" macro completes.
Application.OnTime Now, "Print_Report"
End Sub
Sub Print_Report()
' Report Managers Report.Print should now work correctly.
Application.ExecuteExcel4Macro String:= _
"REPORT.PRINT(""TestPrint"",1)"
End Sub
Keywords: kbcode kbprb kbProgramming KB132219
Technology: kbExcel95Search kbExcelSearch kbExcelWinSearch kbVBASearch kbZNotKeyword3 kbZNotKeyword6