I don't understand why appear this
CAN SOMEONE HELP ME?
I can't reproduce your error. I had and fixed another one.
Thank you very much
Why doesn't work?
what you did, for another time to know?
you have declared swApp variable on wrong place, or wrong scope.
You can avoid this kind errors when you use Option Explicit. Check Require Variable Declaration in Options -> Editor
I'm having the same issue.
Everything was working fine, then I made a modification on a macro, then this...
For some reason Ivana's macro is working fine, but the project explorer and the properties appears empty:
I try restarting the computer, did nothing.
Excel VBA works as usual.
What changes did you made? Can you try opening original macro or one posted by Ivana to see if you can replicate the issue?
I did not made a big chage, I had a macro that turn on end off a layer's visibility, but when it turned on, it turn also unprintable.
So I added a line:
Layer.Printable True (or something like that).
Then save...that's all...
Here is exactly what I've done:
swLayerMM.Visible = False
swLayerPO.Visible = True
swLayerMM.Printable = False
swLayerPO.Printable = True
Note that I can still open the macro in SolidWOrks 2012. Each time I have a corrupted macro in SolidWorks 2015, I open it in 2012, and it usually works... don't know why though...
Once open on SolidWorks 2012, I made a slight changes (I add a comment 'Test in a random line)
And it works once again on 2015...
I can't explain why thought...
That's a way to repair the macro, but I can't tell what I did wrong.
Thanks for the help!
Macro becomes corrupted due to references getting messed up.
But how it get messed up so easily and how opening it on 2012 clean it?
If I can understand that it would avoid me a lot of trouble.
The original macro is opening fine for me, no errors.
Retrieving data ...