Microsoft KB Archive/192405

= XL97: Copy and Paste from Access to Excel May Generate Errors =

Article ID: 192405

Article Last Modified on 10/22/2000

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q192405



SYMPTOMS
If you copy records from Microsoft Access and paste them into Microsoft Excel 97, you may receive the following error messages:

In the Excel Visual Basic for Application Editor, the following error may appear:

File not found

When you click OK, the following error appears:

Microsoft Excel cannot paste the data

NOTE: The data is correctly pasted as expected.



CAUSE
This may occur if the following conditions are true:
 * You copy records in Microsoft Access. -or-


 * You copy records in a workbook from a second running instance of Excel. -and-


 * The Excel file in which the data is pasted includes a Visual Basic for Applications module and the file has been saved prior to the paste.



WORKAROUND
To work around this problem, do one of the following:
 * Do not include any Visual Basic for Applications modules in the workbook into which you want to paste records. -or-


 * Use Microsoft Query to query the database and return the data directly to Excel. To start a new query, click Get External Data on the Data menu and click Create New Query. -or-


 * Use a Visual Basic for Applications macro code to query the data and bring it directly into Excel.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows.



MORE INFORMATION
The same errors occur whether you execute this process manually or with Visual Basic for Applications macro code.

