|
|
Question : Cannot Open Microsoft Excel-Add-In for Editing
|
|
I am using Office 2000 and have reference to Excel 9 in vba
I have a form which fires off a query which is sent to Excel for analyzing. This works ok if I open the query and click Tools/OfficeLink/Analyze It with MS Excel
However, using the following code brings up the following Error from Excel
"Cannot Open Microsoft Excel-Add-In for Editing. Please edit the sourse document instead." This box appears four times before the exported query is revealed in a sheet.
The code is
Private Sub cmdxxx_Click() DoCmd.SetWarnings False DoCmd.OpenQuery "zzzzzz", acNormal, acEdit SendKeys "SendKeys" "%TLA%Y"", True,True" DoCmd.SetWarnings True End Sub
Can an expert suggest how I can overcome this. Many thanks
|
Answer : Cannot Open Microsoft Excel-Add-In for Editing
|
|
why dont u just dump it to a file using DoCmd.OutputTo?
DoCmd.OutputTo acOutputQuery, "zzzzz", acFormatXLS, "nameoffile.xls", True
|
|
|
|
|