Imports Excel = Microsoft.Office.Interop.Excel Imports Microsoft.Office.Interop Imports Microsoft.Office.Interop.Excel Select Case ComboBox1.SelectedItem Case "Open Excel" Dim oExcel As New Microsoft.Office.Interop.Excel.Application() Dim oBook As Excel.WorkbookClass Dim oBooks As Excel.WorkbookClass 'Start Excel and open the workbook oExcel.Visible = True 'oBooks = oExcel.Workbooks oExcel = oExcel.Open("H:\Copy of Book1.xlsm") 'Run the subroutine. oExcel.Run("Sheet1")
oExcel = oExcel.Open("H:\Copy of Book1.xlsm")
oBook = oExcel.Workbooks.Open("H:\Copy of Book1.xlsm")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)