This KB combines and replaces the information that was found in these other KBs:
- KB00364 – PI add-ins to Excel not available with various VBA errors after upgrading to Office 2010.
- KB00267 – Run-time error ‘459’: Object or class does not support the set of events” or “Compile Error in Hidden module: Main” error message appears when opening Excel installed with PI Data Link.
- KB00526 PI Data Link error: Object library invalid or contains references to object definitions that could not be found.
- KB00631 PI Data Link Error: “System Error &H80040111 (-2147221231). Class Factory cannot supply requested class.
When using MS Excel with one or more PI add-ins enabled (PI Data Link, PI Tag Configuration, or PI Batch View for Excel), Microsoft Visual Basic for Applications errors are encountered. While opening Ms Excel these errors can be seen or while using functions within add-ins, like the Insert Trend function in PI Data Link.
- Could not load an object because of unavailability on this machine
- Compile error in hidden module: mod Add in
- Compile error in hidden module: Main
- Object library invalid or contains references to object definitions that could not be found
- Run-time error ‘459’: Object or class does not support the set of events
- System Error &H80040111 (-2147221231). ClassFactory cannot supply requested class
From a variety of issues these errors originate, but they are often related to a malfunctioning MS ActiveX control used by add-in, or by old cached VBA files. The following steps may help to resolve this issue.
Verify required prerequisites and settings
- Make sure that the add-ins and related items are installed properly. For example, if the PI SDK is not installed, then that will affect many of the PI add-ins.
- Check that the ActiveX controls are enabled (not disabled). In Excel select File> Options> Trust Center> Trust Center Settings> ActiveX Settings. This should NOT be set to ‘Disable all controls without notification’.
Check for cached *.exd files
Search for all files(including hidden file) with the extension *.exd. (By default, Windows does not search for hidden files, so you must change that setting in order to see them). One way to find all *.exd files in a given hard drive is by opening a command prompt, navigating to the root directory of the drive (for example, by first entering “C:” and then “CD \” to get to the root of the C: drive), and then running the following command: dir *.exd /b /a /s
If you find any exd files, reopen Excel by deleting them.
These exd files are created automatically when required, but cleaning is not done automatically and these types of errors may occur, particularly when the runtime files are updated through Microsoft patches.
Relevant software to repair
If you have not already, try repairing the installation of PI Data Link along with the Ms Office or Excel. If a required runtime file or reference is missing, then a repair will simply correct this. Excel Repair Tool being professional software is capable of fixing any errors related to MS Excel. It can easily recover the data in Excel, solve any type of excel corruption error and above all it has easy and consistent user interface.
Steps to fix this error:
- Hit on the “OK” button to start the process.
- Select the corrupt .xls or .xlsx file by hitting on “Select file” Choose the “Select folder” to search a .xls or .xlsx file in particular folder. select the “Search file” button to search a .xls or .xlsx file in particular drive.
- Click “Scan” button to begin the scanning process after the selecting the corrupt file
- You can see the scanning process is in progress
- After the scanning is finished, you can preview your corrupt file from right panel
- Hit on the “repair” button to begin the repair process.
- Select the desired location to save the repaired excel file and after that hit on “OK”.