Microsoft KB Archive/299372

= File opens very slowly in Excel 2000 =

Article ID: 299372

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q299372



SYMPTOMS
When you open or close a workbook in Microsoft Excel, the operation may take longer than expected.



CAUSE
This behavior can occur if one or more .emf files in the following folders are corrupted:

C:\Windows\Temp

(Microsoft Windows 98 or Microsoft Windows Millennium Edition [Me])

Documents and Settings\ \Local Settings\Temp

(Microsoft Windows 2000)



RESOLUTION
To resolve this issue, follow these steps:  Start Windows Explorer. Locate C:\Windows\Temp, or to Documents and Settings\ \Local Settings\Temp (depending on your operating system). Right-click the .emf file, and then click Delete.

You receive a message similar to the following:

Are you sure you want to send  to the Recycle Bin?

 Click Yes on the message. Repeat steps 3 and 4 until all of the .emf files have been deleted.

<div class="workaround_section">

WORKAROUND
To prevent this behavior from occurring, use the following code to create a Microsoft Visual Basic macro.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Private Sub Workbook_Open Call DeleteEMFs End Sub

Private Sub DeleteEMFs Dim fso As Variant Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;) Dim fs As FileSearch Dim i As Long Set fs = Application.FileSearch With fs   .LookIn = fso.GetSpecialFolder(2) .Filename = &quot;*.emf&quot;

If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then On Error Resume Next For i = 1 To .FoundFiles.Count Kill .FoundFiles(i) Next i      On Error GoTo 0 End If End With

Set fso = Nothing Set fs = Nothing End Sub

<div class="references_section">