![microsoft visual basic for applications error solidworks microsoft visual basic for applications error solidworks](https://software-solutions-online.com/wp-content/uploads/2021/03/vba-goto-04-goto-line-number.png)
- #MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS HOW TO#
- #MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS 64 BIT#
- #MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS CODE#
#MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS 64 BIT#
If someone else wrote the DLL, you will need to search online or contact them to determine if a 64 bit version available. This will allow the DLL to run on 32 or 64 bit systems. If you wrote the DLL yourself, then re-compile the DLL to work on “Any CPU”.
#MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS CODE#
Fixing the Problemįixing the problem comprises three steps: 1) obtaining a 64 bit version of the DLL that is causing problems, 2) re-declaring its functions using new VBA7 keywords, 3) including conditional code that allows for backward compatibility on VBA6. Later, if you’re so inclined, you can keep reading and learn the technical “why” behind the dilemma.
#MICROSOFT VISUAL BASIC FOR APPLICATIONS ERROR SOLIDWORKS HOW TO#
So if you are using any of the Microsoft Common Controls in your user form (e.g., slider, calendar, web browser) then you are using ActiveX controls that will fail in VBA7.įirst I’m going to give you the quick-and-dirty steps on how to (hopefully) fix your dilemma. ocx but are actually still DLLs underneath. This includes ActiveX controls, which have the extension.
![microsoft visual basic for applications error solidworks microsoft visual basic for applications error solidworks](https://asciicasts.com/system/photos/146/original/e170i06.png)
The reason your macros are failing is because they are not set up to reference 64 bit DLL files, or the DLL files you are trying to reference are not 64 bit compatible. Why is this? Were we not told that VBA7 is 100% compatible with VBA6? The issue isn’t with VBA. When you try to run the macro, you may get the following error. That being said, you may have discovered that some of your macros no longer work in SolidWorks 2013. Nothing about the SolidWorks API itself has changed that requires modification. For this reason, all SolidWorks API code that you write in pre-2013 should work in 2013, and vice versa. VBA7 is 100% compatible with VBA6 (the version included in SolidWorks 2012 and earlier). This is great news for several reasons, the most significant being: 1) VBA user forms no longer pop-up behind the SolidWorks application window, and 2) it proves to us that both Microsoft and SolidWorks Corporation are serious about maintaining the VBA language, which is the language of most SolidWorks API code. SolidWorks 2013 includes VBA 7-the latest version of Microsoft’s Visual Basic for Applications. If your scenario isn’t covered in the video, then I probably cover it in this article. Run-time Error '5': Invalid procedure call or argumentĬompile error: The code in this project must be updated for use on 64-bit systems is displayed.In a hurry? Just watch the video above. Run-time error '429': ActiveX component can't create object Run-time error '438': object doesn't support this property or method
![microsoft visual basic for applications error solidworks microsoft visual basic for applications error solidworks](https://www.codestack.net/solidworks-api/document/sheet-metal/rename-flat-patterns/renamed-flat-patterns.png)
Run-time Error '91': Object variable or With block variable not setĬompile Error: Can't find project or libraryĬompile Error: User-defined type not defined In this article I will go through the most common symptoms of the errors in the macros.īrowse the errors list to find the most common solutions.Ĭlick link to get the detailed description of the issues, its cause and the steps to resolve the problem. Macro works correctly for some models but not the others.Macro works on some of the workstations but not on the others.Macro which used to work correctly before stopped working.This is usually one of the following scenarios: or even recorded from SOLIDWORKS.īut in some cases the macro doesn't work as expected. Macros can be developed in-house or downloaded from the different web-sites including SOLIDWORKS forum, 3D Content Central, CodeStack etc. SOLIDWORKS macro is the most common way to automate and extended the functionality of SOLIDWORKS via its API.