G
Guest
Hi
I've written some code which creates an Excel spreadsheet, enters some text, does some formatting, then saves and closes it. It all runs without any errors but if I try and open the spreadsheet I just get the header bar. If I close Access and then try I can open the spreadsheet without any problems. This is the code:
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Set oExcel = CreateObject("Excel.application")
Set oBook = oExcel.Workbooks.Add
Set oSheet = oBook.Worksheets(1)
....... formatting
oBook.SaveAs "D:\My Documents\Databases\Surveys\test.xls."
oExcel.Quit
Any ideas?
Karen
I've written some code which creates an Excel spreadsheet, enters some text, does some formatting, then saves and closes it. It all runs without any errors but if I try and open the spreadsheet I just get the header bar. If I close Access and then try I can open the spreadsheet without any problems. This is the code:
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Set oExcel = CreateObject("Excel.application")
Set oBook = oExcel.Workbooks.Add
Set oSheet = oBook.Worksheets(1)
....... formatting
oBook.SaveAs "D:\My Documents\Databases\Surveys\test.xls."
oExcel.Quit
Any ideas?
Karen