The Situation: You’ve just made a change to some VBA code in a FactoryTalk SE version 12 network distributed application. You’re ready to launch a runtime client file, but you’re met with the error message: “Failed to load the VBA project for the display ‘your_display_name’ (Error: 0X1). The display cannot be opened at run-time.” Oddly enough, any client that was already running continues to operate without any issues.
The Options: When this error occurs, here are some suggestions sourced from the internet that might help you resolve the issue as well as the solution that worked for me:
- Check for Object Conflicts: Ensure no objects on the display are set as ‘VBA Control’ which might conflict with the VBA project (source).
- Validate the VBA Code: Use tools like the VBA editor and object explorer to verify the integrity of your code (source).
- Review Error Handling: Implement proper error handling in your VBA code to prevent runtime failures (source).
- Examine Project Compatibility: Make sure there are no compatibility issues between different versions of FactoryTalk SE when importing projects (source).
The Solution: After considering the above options, the solution to this issue was found in ensuring the VBA project code isn’t running in your development environment. Here’s what you can do:
- Stop Running VBA Code: Make sure to run and then stop the VBA code in the development environment to clear any active processes.
- Restart or Reboot: If the problem persists, restart your FactoryTalk session or reboot your computer to ensure all VBA code has terminated.