Hola no veo el código donde haces la apertura del excel, creo que no lo has pegado. ¿Estás usando Visual Basic 6? Para evitar que excel continue corriendo tienes que cerrar todo en orden inverso a como lo fuiste abriendo.
He encontrado este ejemplo que usa dos textbox y dos command buttons
'Para declarar estas variables antes hay que añadir una referencia
'a microsoft excel 'xx' object library utilizando los menús.
'you need two text boxes and two command buttons
'on the form, an excel file in c:\book1.xls
Dim xl As New Excel.Application
Dim xlsheet As Excel.Worksheet
Dim xlwbook As Excel.Workbook
Private Sub Command1_Click()
'the benifit of placing numbers in (row, col) is that you
'can loop through different directions if required. I could
'have used column names like "A1" 'etc.
Text1.Text = xlsheet.Cells(2, 1) ' row 2 col 1
Text2.Text = xlsheet.Cells(2, 2) ' row 2 col 2
'No olvidar hacer esto o no será posible volver a abrir
'book1.xls de nuevo hasta que se reinicie el computador.
xl.ActiveWorkbook.Close False, "c:\book1.xls"
xl.Quit
End Sub
Private Sub Command2_Click()
xlsheet.Cells(2, 1) = Text1.Text
xlsheet.Cells(2, 2) = Text2.Text
xlwbook.Save
'No olvidar hacer esto o no será posible volver a abrir
'book1.xls de nuevo hasta que se reinicie el computador.
xl.ActiveWorkbook.Close False, "c:\book1.xls"
xl.Quit
End Sub
Private Sub Form_Load()
Set xlwbook = xl.Workbooks.Open("c:\book1.xls")
Set xlsheet = xlwbook.Sheets.Item(1)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set xlwbook = Nothing
Set xl = Nothing
End Sub