Private Sub Form_Load () Dim xlApp As Excel.ApplicationDim xlBook As Excel.WorkbookDim xlSheet As Excel.WorksheetSet xlApp = CreateObject ( "Excel.Application") 'Create EXCEL Object Set xlBook = xlApp.Workbooks.Open (App.Path & "/ 1 ") 'Open Excel Workpiece Book Files I Excel Workpiece XLapp.visible = True' Sets Excel Objects (Or Nomo) Set Xlsheet = XLbook.Worksheets (1) Set Activity Worksheet Xlsheet.cells (1, 1) = "Part Name" is assigned to cells (Row, Col) Xlsheet.cells (1, 2) = "Price" 'xlsheet.printout' Print Worksheet 'XLbook.close (true)' Close Workbook 'XLapp.quit' End Excel object set xlapp = Nothing 'Release XLAPP object' xlbook.runautomacros (xlautoopen) 'Run Excel boot macro' xlbook.runautomacros (xlautoClose) 'Run Excel Close Macro
End Sub