看板 Visual_Basic 關於我們 聯絡資訊
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click Dim newExcel As New Microsoft.Office.Interop.Excel.Application Dim x As Integer x = TextBox3.Text With newExcel .Workbooks.Open(Filename:="F:\課程資料\專題\sreader修改檔\sreader 最新檔\Source_code\SReader\1.xls") .Cells(x, 1) = TextBox2.Text .ActiveWorkbook.Save() .ActiveWindow.Close() .Quit() End With MsgBox("讀取、寫入完成!") End Sub 我已經用上方程式寫出一個把數值寫入excel欄位中,但是我想再寫一個button可以將 這個excel中欄位的數值叫到text,但是我不太會寫 請問要該如何把此excel中的欄位值叫出來? 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.25.118.139