In Microsoft Office XP, you may use the Web Service References Tool that is included with the Microsoft Office XP Web Services Toolkit 2.0 to add a reference to a Web service in a Visual Basic for Applications (VBA) project. When you try to run this project in Microsoft Office 2003, you may receive the following error message:
Compile error: Can't find project or library
In Office XP, the VBA project contains a reference to the Microsoft SOAP Type Library 3.0. However, Office 2003 uses the Microsoft Office SOAP Type Library 3.0 instead of the Microsoft SOAP Type Library 3.0. If VBA cannot locate the Microsoft SOAP Type Library 3.0 on your computer, the behavior that is mentioned in the "Symptoms" section occurs.
To work around this problem, add a reference to the Microsoft Office SOAP Type Library 3.0 in the VBA project. To do this, follow these steps:
In the VBA editor, click References on the Tools menu. The References - VBAProject dialog box appears.
Click to clear the MISSING: Microsoft SOAP Type Library v3.0 check box.
Click Browse. The Add Reference dialog box appears.
Locate and then click the Mssoap30.dll DLL that is included with Office 2003, and then click Open. A reference to the Microsoft Office SOAP Type Library 3.0 is added in the References - VBAProject dialog box.
Click OK, and then run the project.
This behavior is by design.
Steps to reproduce the behavior
Install Office 2003.
Install the Microsoft Universal Description, Discovery, and Integration (UDDI) Software Development Kit (SDK).
Install Microsoft XML.
Install the Microsoft Office 2003 Web Services Toolkit.
Start Excel 2003.
On the File menu, click Open. The Open dialog box appears.
Locate and then click an Excel worksheet that contains a VBA project that is similar to the VBA project that is mentioned in the "Symptoms" section, and then click Open.
On the Tools menu, point to Macro, and then click Visual Basic Editor. The VBA editor appears.
To run the VBA project, click Run Sub/UserForm on the Run menu.
For more information, visit the following the Microsoft Developer Network (MSDN) Web sites: