Try this..
Make sure you include the Microsoft.Office.Interop.Excel referenceCode:Dim xlApp As Excel.Application = DirectCast(CreateObject("Excel.Application"), Excel.Application) Dim xlAppWorkbook As Excel.Workbook = DirectCast(xlApp.Workbooks.Add(), Excel.Workbook) 'Add textbox value to cell A1 xlApp.Range("A1").Value = TextBox1.Text xlApp.Range("B1").Value = TextBox2.Text xlApp.Range("A1").Value = TextBox3.Text xlApp.Range("C1").Value = TextBox4.Text xlApp.Range("D1").Value = TextBox5.Text 'and so on... xlApp.Visible = True
And add this:
Code:Imports Microsoft.Office.Interop




< Rate a post if it helps! 
Reply With Quote