Private Sub Command1_Click() Dim ExApp As New Excel.Application Dim Exb As Excel.Workbook Dim Exsh As Excel.Worksheet
Dim R1 As Excel.Range ExApp.Workbooks.Open D\my ducuments\book1.xls Set Exb = ExApp.Workbooks(1) Set Exsh = Exb.Worksheets(Sheet1) Exsh.Range(D4)=Text1.Text
ExApp.Workbooks.Close ExApp.save ExApp.Quit Set ExApp = Nothing End Sub