function test()
dim oApp, oWB, arr
set oApp = CreateObject("Excel.Application")
oApp.visible=true
set wb = oApp.Workbooks.Open("D:\My Documents\SampleDB.xls")
redim arr(4)
arr(0) = Form1.Text1.Value
arr(1) = Form1.select1.options(Form1.select1.selectedindex).text
arr(2) = Form1.text2.Value
arr(3) = Form1.text2.Value
arr(4) = Form1.text2.Value
with wb.sheets("Sheet1").cells(1,1).currentregion
.offset(.rows.count,0).resize(1).value = arr
end with
wb.close true
end function
Bookmarks