To work around this problem, use either of the following methods.
Method 1: Disable Missing References in the References Dialog Box
If the
References dialog box appears when you attempt to run a
macro, to insert a macro, or to record a new macro, follow these steps:
- In the Available References list, clear any check boxes to the left of references that are labeled "MISSING."
- After you clear all the missing references, click OK.
NOTE: Save the workbook before you close it. Otherwise, the change
to the
References dialog box may not be saved.
Method 2: Remove References in Microsoft Excel 2000
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements.
You can prevent the
References dialog box from appearing in
Microsoft Excel 5.0 or 7.0 by removing references that are potentially
missing from the workbook while it is open in Microsoft Excel 2000. The
following sample macro removes references:
Sub RemoveLibraryReferences()
On Error Resume Next
Dim xObject As Object
Set xObject = ThisWorkbook.VBProject.References.Item("Office")
ThisWorkbook.VBProject.References.Remove xObject
Set xObject = ThisWorkbook.VBProject.References.Item("stdole")
ThisWorkbook.VBProject.References.Remove xObject
End Sub
When you run the macro, it programmatically removes the reference to the
Microsoft Office 9.0 Object Library and OLE Automation from the workbook.
You can then save the workbook in the Microsoft Excel 5.0/95 Workbook
format. When you open the workbook in Microsoft Excel 5.0 or 7.0, and then
run a macro, insert a module, or record a new macro, the error message does
not appear.
NOTE: You cannot run this macro in Microsoft Excel 5.0 or 7.0. The
macro works
only in Microsoft Excel 97 or later.