Hi All you experts!
I'me running on Win7, Office 2010, Acc2003 format (.mdb), writing data to Excel 2010 (.xlsx)
I have code to create an Excel file, send record set data to it, and then add some formulas and formatting.
I was trying to tune up the formulas, when I got a pull back:
Access VBA code suddenly stops running, and the file gets displayed in Excel:banghead:
ApXl is Application.Excel
xlWSh is the Excel WorkSheet
rst is my DAO.Recorset
The same happens when I have ApXl.Visible = True
Any Ideas?
Thanks in advance!
I'me running on Win7, Office 2010, Acc2003 format (.mdb), writing data to Excel 2010 (.xlsx)
I have code to create an Excel file, send record set data to it, and then add some formulas and formatting.
I was trying to tune up the formulas, when I got a pull back:
Access VBA code suddenly stops running, and the file gets displayed in Excel:banghead:
Code:
'ApXl is Application.Excel
'xlWSh is the Excel WorkSheet
'rst is my DAO.Recorset
ApXl.Visible = False
...
'After this line code stops, and the file gets displayed in Excel:
xlWSh.Range(Col & CStr(row)).CopyFromRecordset rst
xlWSh is the Excel WorkSheet
rst is my DAO.Recorset
The same happens when I have ApXl.Visible = True
Any Ideas?
Thanks in advance!
Last edited: