Like many people here, I am a SolidWorks user who is stumbling around trying to make a couple of macros to help our workflow. Much of what I do is from others macros. I have some understanding of what I am doing, but it’s still at the beginner level.
I’m using SolidWorks 2020 on Windows 10. I have been doing VBA macros.
I have a macro I am working on that calls a function “BrowseForFolder”. I have figured out how to get it to accept a starting location for browsing rather than defaulting to the desktop. The only problem with that, if I set it for "C:" for example, I can’t browse higher to get to a network drive if we need that instead. If I don’t pass it a starting location, it starts at the desktop, which has me navigating quite a ways to get where I want. Is there a different way to do this that would work better?
Also, since I have a few macros that use similar functions, should I figure out how to store them separately rather than essentially repeating the same code? I know how to call a macro from a macro. Do you do the same sort of thing to call a function?
I have attached my macro.
Thanks for your help.
Carrie