Private Sub Excelへ出力ToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Excelへ出力ToolStripMenuItem.Click Dim i, j As Integer Dim xlApp As New Excel.Application Dim xlBooks As Excel.Workbooks = xlApp.Workbooks Dim xlFilePath = My.Computer.FileSystem.CurrentDirectory & "\重量計算1.xlsm" Dim xlBook As Excel.Workbook = xlBooks.Open(xlFilePath) Dim xlSheets As Excel.Sheets = xlBook.Worksheets Dim xlSheet As Excel.Worksheet