Ru,
Just create a new form and paste the below by double clicking on it. I guess this code snippet would help you!
**************Code snippet starts here**************
Rem General Declaration
Dim objExcel As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Private Sub Form_Load()
Rem Initialization of variables
Set objExcel = New Excel.Application
Set objWorkBook = objExcel.Workbooks.Add
Set objWorkSheet = objWorkBook.Worksheets("Sheet1")
Set objWorkSheet = objExcel.ActiveSheet
objWorkSheet.Range("A1").Value = "Vadivel"
objExcel.Visible = True ' The created excel workbook would be visible.
objWorkBook.Close (True) 'This will fire the SaveAs dialog box
End Sub
**************Code snippet ends here**************
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com