Za CommonDialog imas sav kod u MSDNu. Ako nemas MSDN evo
ovde demo za CD.
Ze Excel Object Model, takodje, imas sampleova u MSDNu.
Code:
Dim oExcel As Excel.Application
Dim oWorkbook As Workbook
Set oExcel = New Excel.Application
Set oWorkbook = oExcel.Workbooks.Add
oWorkbook.SaveAs "C:\myfile.xls"
oWorkbook.Close
Set oWorkbook = Nothing
Set oExcel = Nothing