Page 1 of 1

Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Fri Apr 15, 2022 11:00 am
by Conklin
CANNOT OPEN MACRO TO RUN OR EDIT in SOLIDWORKS Professional 2020 SP5.0
Am able to to this at work OK
But at home it does not NOW let me. (It used to be OK, at home)
same macros same every thing that I can tell
something is different.
Could it be a Microsoft VBA thing that is different or something?
How do I check what is the right version of VBA or whatever etc...
I have proper access to "C:\SW Macros" and file locations are OK in SW
message I get is below:
CANNOT OPEN MACRO TO RUN OR EDIT-SOLIDWORKS Professional 2020 SP5.0.jpg
CANNOT OPEN MACRO TO RUN OR EDIT-SOLIDWORKS Professional 2020 SP5.0.jpg (13.01 KiB) Viewed 4203 times
(Note: All macros at work, work, & do not work at home, it is not just this one)
Thanks for any help

edit:

It occurred to me that I did upgrade my MS Office to 2019 (at Home)
Office Is Now 2019.jpg
Office Is Now 2019.jpg (17.56 KiB) Viewed 4199 times
It was 2016
could that be the problem?

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Fri Apr 15, 2022 4:08 pm
by Austin Schukar
Yep....this happened to me. You're right on the money. VBA 7.1 isn't introduced to SW until SOLIDWORKS 2021 SP2, while the MS Office update installed VBA 7.1. I had to wait until my IT department was comfortable installing SW '21 SP2 to get back to editing / running VBA macros.

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Fri Apr 15, 2022 6:01 pm
by Conklin
Austin,
Thanks.
That is what I thought. But I have looked and looked
For any info that supports that BUT can not find any
I am sure it's true but just wanted to see if it was
mentioned any where on the official SW sites
or if anyone else has/had that problem.
I cannot find anything!
Seems to me to be a pretty big problem!
At least for me... o[ o[

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Sat Apr 16, 2022 2:10 pm
by Conklin
OK I looked some more and...

Youtube & Google to the rescue!

"How To Fix SOLIDWORKS VBA 7.1 Installation Error"
from (my VAR) "CADimensions, Inc."
https://www.youtube.com/watch?v=wjAz51lye1g

& this from "Hawk Ridge Systems"
https://support.hawkridgesys.com/hc/en- ... stallation

They both describe a problem installing an older version after a newer one, particularly, SW 2021 SP2, has been installed
BUT They give insight as to how to remedy my situation. Where I think in my case MS Office 2019 installed the "BAD" or uncooperative VBA 7.1
Solution is to uninstall VBA 7.1
and then do a modify for SW 2020 choosing to "change" then "repair" the install of the SW 2020 SP 5.0

There is also a youtube here that is similar:
https://www.youtube.com/watch?v=cw9OFG8pIgs

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Mon Apr 18, 2022 4:31 pm
by Austin Schukar
Conklin wrote: Sat Apr 16, 2022 2:10 pm OK I looked some more and...

Youtube & Google to the rescue!

"How To Fix SOLIDWORKS VBA 7.1 Installation Error"
from (my VAR) "CADimensions, Inc."
https://www.youtube.com/watch?v=wjAz51lye1g

& this from "Hawk Ridge Systems"
https://support.hawkridgesys.com/hc/en- ... stallation

They both describe a problem installing an older version after a newer one, particularly, SW 2021 SP2, has been installed
BUT They give insight as to how to remedy my situation. Where I think in my case MS Office 2019 installed the "BAD" or uncooperative VBA 7.1
Solution is to uninstall VBA 7.1
and then do a modify for SW 2020 choosing to "change" then "repair" the install of the SW 2020 SP 5.0

There is also a youtube here that is similar:
https://www.youtube.com/watch?v=cw9OFG8pIgs
Nice! Did it work for you???

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Mon Apr 25, 2022 1:06 am
by Conklin
Yes, Now all is as it should be.

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Tue Apr 26, 2022 2:11 am
by Koen88
We ran into the same problem with SolidWorks 2020 SP 5.0 and office 365. All our macro's didnt work. A repair of SolidWorks was enough to fix it.

Re: Need Help, CANNOT OPEN MACRO TO RUN OR EDIT

Posted: Mon May 02, 2022 8:16 am
by SPerman
I ran into the same issue downgrading from 2022 to 2020. Thanks for the link to the Hawkridge bat file.