Here you have some example code and a link that might help you out:
Dim ExcelApp As Excel.Application
Dim ExcelWorkbook as Excel.Workbook
Dim ExcelSheet as Excel.Worksheet
Dim DataArray(5, nRowValues) as variant
Dim SheetIndex as Long
SheetIndex = 1
Set ExcelApp As New Excel.Application
Set ExcelWorkbook = ExcelApp.Workbooks.Add
' Write the code that will fill the DataArray
' Write the values of the 5 lines to a new sheet
ExcelSheet = ExcelWorkbook.Worksheets.Add
ExcelSheet.Name = "KQ" & CStr(SheetIndex)
ExcelSheet.Range("A1").Value = DataArray
ExcelWorkbook.Close False, "c:\filename.xls"
ExcelApp.Quit
Set ExcelWorkbook = Nothing
Set ExcelApp = Nothing
More info on the open dialog box:
http://www.mrexcel.com/archive/VBA/19208.html[
^]
Good luck!