I am trying to run a macro on 2012 SP 4. I get the "Cannot Open" error when trying to edit or run the macro.
I can edit the macros in 2014 on the same machine.
The API tools are installed for 2012...
Ok , try this (from my VAR) and let me know if it works
To uninstall VBAs: a. Rename VBE6EXT.OLB to VBE6EXT.OLB.OLD in C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB, if you cannot find it ignore this step b. Search your SOLIDWORKS download folder or DVD for a folder called Prereqs and open it c. Look for a sub-folder called VBA and open it, then right click on each file starting from vba71 and click uninstall, some files may not allow you to uninstall that is ok d. After you have uninstall these files, right click and then reinstall each file and test your Macros.
3. Third possible solution is to backup your parts, assembly drawing etc, and do a complete uninstall and reinstall of SOLIDWORKS
Edit macro in 2014 and remove all libraries/references related to SOLIDWORKS. Now open that macro in 2012 and check the required libraries for 2012. Save and check.
Can you post your macro here
Does this happen on any computer with SolidWorks in your facility or just your computer?
As Christian said, one of us could test it as well.
SolidWorks API Training and Services
This is a macro that I pulled from the forum.
I can't even edit it in 2012
Also, I can't create a new macro in 2012 either....
It's this computer so something is up with the install or something.
The API was not installed initially so I installed it hoping that would fix it, but it didn't.
My old computer from a week ago ran the macros fine in 2012
Here is your macro
Create a new macro in SW2012 and copy/paste this in
When did you create this macro and what SW version this macro was written?
Never mind: Written by Brandon Massoni: 1/6/2015
That's vary kind, but VBA doesn't open when I create a new macro in 2012. ......
You mean nothing popup when you Tools>Macro>New...
Yes, that is my real problem (or one of them)
The actual problem is that I'm not savvy enough to quickly port 2012 SW VBA code to 2014 compatible. There are issues with running my actual macro in 2014.
are you runing SW on windows 7?
Yes. 64 bit
I'm not sure but the Windows update KB3027630 might be the cause
I'll search my email sometime to day and find the fix from my VAR
SW 2012 doesn't have a VBA folder.
#2 is giving me installation location errors.
I am trying option #3....
Ouch ... this is a fix for SW2015 and I don't have SW2012 here to check
I think the best way is to contact your VAR for this issue - This can be easily fixed
Unfortunately #3 didn't work....
go to plan B : uninstall and reinstall SW2012
Just wondering if you already have 2014 on your computer, why needs 2012?
Can you start a new macro in 2012? And then copy paste the codes from this macro to new one and check?
The problem here is he can't create a new macro in SW2012 which is similar as the problem I have in SW2015 after the windows update KB3027630.
Oops sorry missed that.
I can't get a macro to work in 2014 that was developed in 2012.
I'm not well versed in VBA let alone with the SW API....
Can you reset your SOLIDWORKS registries for 2012 version and check if that helps?
I can look into that. I did do a full reinstall yesterday evening though...
I've actually been dumbing down the macro I have and I think I can get it to work in 2014...
Retrieving data ...