Referanslara Microsoft Excel X.XX Object Library referansını ekle,
butonun tıklandığında olayına
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Open(CurrentProject.Path & "\excel.xlsx")
xlApp.Visible = True
With xlWB.Sheets("Sayfa1")
.Range("B5") = Me.Metin1
.Range("E3") = Me.Metin2
End With
With xlWB.Sheets("Sayfa2")
.Range("D4") = Me.Metin3
End With
Set xlWB = Nothing
Set xlApp = Nothing
kodu ekle.