# Revision control app macro (release)

**URL:** <https://forum.cadmunity.com/t/revision-control-app-macro-release/1557>\
**Category:** Macro Library\
**Created:** [March 23, 2022, 12:53pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557 "2022-03-23T12:53:57Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [August 7, 2024, 7:20pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/41 "2024-08-07T19:20:38Z")

</div>

> [@](#):
>
> It’s mostly changing some constants and some terminology.  
> For example we use Phase / Revision instead of Branch / Version
> 
> While updating my version something weird ![grumph](https://forum.cadmunity.com/uploads/default/original/1X/8bc095a3ae1d52afa1048c8e85630907ebb470b7.gif "grumph") happened.  
> Both versions (my v3 and the new v4) were opened in the Macro Editor and I was comparing the modules, updating what needed to be.  
> Now, when I open my version everything has been overwritten! My changes are aren’t there!  
> When I open backup files I made this morning, they too are “reset” and don’t have my edits ![o[](https://forum.cadmunity.com/uploads/default/original/1X/03590d98a359a447ce7713c78201cdb8a8cfdb6b.gif "cant..believe...")  
> What’s up???

It sounds like you opened both the old and the new version at the same time, but when you run it from the editor, you activate the wrong version. I don’t think it should overwrite anything. If you can still open the correct version from SW, it means that file is still intact. Check what file is the macro button pointing to:  
image.png  
And make sure you backup that one.

As for the editor, try to close it, maybe restart SW - that should get rid of the two instances of the macro in the editor.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [August 9, 2024, 3:32pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/42 "2024-08-09T15:32:47Z")

</div>

I restarted everything but it seems to be lost for good 😒  
I retrieved a version with Windows’ version history but either it never cached the one I modified or, since we use OneDrive, it’s messed up by Windows.  
I’ll send a copy home next time!

We need a way to implement changes without having to load two macros in SW Macro Editor.

---

<div class="post-metadata">

**Author:** ![JoshuaDeeMan](https://forum.cadmunity.com/letter_avatar_proxy/v4/letter/j/f14d63/32.png) [@JoshuaDeeMan](https://forum.cadmunity.com/u/JoshuaDeeMan)\
**Post date:** [September 25, 2024, 2:53pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/43 "2024-09-25T14:53:46Z")

</div>

What version of Solidworks are you all running? I’m on 2023 SP5.0 currently. I just downloaded V4 and went to run it and it acts like it is thinking for a minute but then nothing happens, no window appears, errors or anything. I also can’t find a string in this code to change the Repository file path.

I was running V2 and used it all the time. Then I transfered all my files into one drive to keep them backed up, they are all still saved locally. I fixed the file path but it has not worked propperly since. It will show the past revisions and can preview and restore them but when I go to create a new revison it will not increment and sometimes will even back up the number instead. I’d be glad to update but like I said I cant gt it to run.

Unfortunaly I know just enough about coding to do very basic stuff with the help of Chat GPT so I’m at a loss where to look to solve the issues. I have really liked using this macro. It is some really awesome work but as much as I like it I may have to purchase a PDM license to keep moving.

Thanks

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [September 25, 2024, 3:19pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/44 "2024-09-25T15:19:40Z")

</div>

> [@](#):
>
> What version of Solidworks are you all running? I’m on 2023 SP5.0 currently. I just downloaded V4 and went to run it and it acts like it is thinking for a minute but then nothing happens, no window appears, errors or anything. I also can’t find a string in this code to change the Repository file path.
> 
> I was running V2 and used it all the time. Then I transfered all my files into one drive to keep them backed up, they are all still saved locally. I fixed the file path but it has not worked propperly since. It will show the past revisions and can preview and restore them but when I go to create a new revison it will not increment and sometimes will even back up the number instead. I’d be glad to update but like I said I cant gt it to run.
> 
> Unfortunaly I know just enough about coding to do very basic stuff with the help of Chat GPT so I’m at a loss where to look to solve the issues. I have really liked using this macro. It is some really awesome work but as much as I like it I may have to purchase a PDM license to keep moving.
> 
> Thanks

Hey, I am using 2024 SP3.1. I haven’t used this macro much after the last release, maybe I missed some bugs. Does this happen with new parts as well? If you can work out the steps how to reproduce this issue from scratch, I can probably fix it. Let me know.

---

<div class="post-metadata">

**Author:** ![JoshuaDeeMan](https://forum.cadmunity.com/letter_avatar_proxy/v4/letter/j/f14d63/32.png) [@JoshuaDeeMan](https://forum.cadmunity.com/u/JoshuaDeeMan)\
**Post date:** [September 27, 2024, 9:14pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/45 "2024-09-27T21:14:10Z")

</div>

I did reread the information on V3 and got V4 to run that way (I think I have been running the wrong entry point) but whenever I hit new branch or new version I get an error “Subscript out of range”. On a new file it is able to put in the base information needed but still throws the same error. On this test I did have the repository routed to a folder that backs up to One drive

I just tried it again with the default repo location which would not be backed up by one drive and it seems to work, though it did hit a stopping point at Branch C till I released a few versions. I may be able to work with this but somehow I need to find a way to back up repo files.

Our IT guy just told me about Symbolic linked folders. I may look into this to make it appear to the macro that One drive doesn’t exists but it would still backup files to that location.

As far as V2 goes the problem happens with any file, new or old I may try the above idea with it as well. It seem to be with the incrementation though. It can view/restore other files in the repository but it can’t increment and thus create a new file.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 5, 2024, 2:53pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/46 "2024-11-05T14:53:18Z")

</div>

> [@DanPihlaja](#):
>
> Great to hear that! Okay, feel free to share it here, but let me know what has been changed exactly, so I can merge your improvements into the main macro.

Hi,  
I used the macro quite a lot here it was great and, with a few changes to follow our revision scheme, it was perfect.  
I say “was” because since yesterday several files won’t work.  
Symptoms:  
-When increasing the branch or the revision I may get the error message “Subscript out of range”  
-In the “available versions” drop-down, there’s no version available, when there are several in the repository.  
If I edit the macro and step in the problem is there:  
22024-11-05 09\_48\_36.png  
I join my version of the macro. I think I only made changes to the interface language and file properties names.  
[VC V4.swp](https://forum.cadmunity.com/uploads/short-url/q2ltdxEWP5PgmvSOCcoj8sSJki8.swp) (306 KB)

---

<div class="post-metadata">

**Author:** ![SPerman](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sperman/32/59_2.png) [@SPerman](https://forum.cadmunity.com/u/SPerman)\
**Post date:** [November 5, 2024, 3:02pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/47 "2024-11-05T15:02:16Z")

</div>

I think it is failing because there is only 1 instance of “\_” in the FileName string, and you are looking for the 2nd one.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 5, 2024, 3:06pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/48 "2024-11-05T15:06:51Z")

</div>

> [@](#):
>
> I think it is failing because there is only 1 instance of “\_” in the FileName string, and you are looking for the 2nd one.

The file I’m using right now that I’m testing on has these in the “Repo” folder:  
66233193\_A.1\_231130-312.SLDPRT  
66233193\_A.2\_231130-312.SLDPRT  
66233193\_A.2\_231130-312.SLDPRT  
66233193\_A.4\_231130-312.SLDPRT  
66233193\_A.5\_231130-312.SLDPRT

---

<div class="post-metadata">

**Author:** ![SPerman](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sperman/32/59_2.png) [@SPerman](https://forum.cadmunity.com/u/SPerman)\
**Post date:** [November 5, 2024, 3:48pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/49 "2024-11-05T15:48:56Z")

</div>

NM. I found the additional modules.

In the quick little bit of testing I did, I only got the “subscript out of range” error if there was no “\_” in the filename.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 5, 2024, 5:51pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/50 "2024-11-05T17:51:19Z")

</div>

Frustrating… it worked well for months and now this.  
The only thing that happened is that I showed how to use it to a co-worker. It did not work on his computer, but I’ll debug that after, if I manage to get it working again on mine.

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [November 5, 2024, 7:07pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/51 "2024-11-05T19:07:44Z")

</div>

Hi guys, sorry for my absence, for some reason I was not getting notifications, and now like 5 of them arrived at once 😮 I am looking into this issue as we speak. If there is no NDA or anything, could you please share at least one file (and it’s revision history files) that shows the “subscript out of range” error, or missing revisions in the list? I can’t seem to replicate either of these issues. If I had some samples, I could finally nail this down.

P.S. I think the issue was the revision sorting algorithm, I rewrote it, but I still want to test it with some of problematic files to ensure I didn’t miss something.

---

<div class="post-metadata">

**Author:** ![SPerman](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sperman/32/59_2.png) [@SPerman](https://forum.cadmunity.com/u/SPerman)\
**Post date:** [November 5, 2024, 7:55pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/52 "2024-11-05T19:55:55Z")

</div>

> [@](#):
>
> Frustrating… it worked well for months and now this.  
> The only thing that happened is that I showed how to use it to a co-worker. It did not work on his computer, but I’ll debug that after, if I manage to get it working again on mine.

I think the root problem will be that the filename doesn’t have an underscore. Figuring out where, in all of that code, the filename is selected and fed to the function is a different question.

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 5, 2024, 8:55pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/53 "2024-11-05T20:55:02Z")

</div>

> [@](#):
>
> Hi guys, sorry for my absence, for some reason I was not getting notifications, and now like 5 of them arrived at once 😮 I am looking into this issue as we speak. If there is no NDA or anything, could you please share at least one file (and it’s revision history files) that shows the “subscript out of range” error, or missing revisions in the list? I can’t seem to replicate either of these issues. If I had some samples, I could finally nail this down.
> 
> P.S. I think the issue was the revision sorting algorithm, I rewrote it, but I still want to test it with some of problematic files to ensure I didn’t miss something.

Here’s a file and it’s versions from the Repo folder. I don’t know why there’s no “A.1” version. To be sure it was not a cause to the problem I duplicated A.2 and renamed to A.1 but it changes nothing.  
When I run the macro on this file, “Phases” and “Revision” change results in the “subscript out of range” error. The drop-down shows nothing.  
[231130-416.zip](https://forum.cadmunity.com/uploads/short-url/h4UgZZZbOpPPYJNpHeprlCPNFPh.zip) (1.02 MB)

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [November 5, 2024, 9:15pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/54 "2024-11-05T21:15:16Z")

</div>

> [@](#):
>
> Here’s a file and it’s versions from the Repo folder. I don’t know why there’s no “A.1” version. To be sure it was not a cause to the problem I duplicated A.2 and renamed to A.1 but it changes nothing.  
> When I run the macro on this file, “Phases” and “Revision” change results in the “subscript out of range” error. The drop-down shows nothing.231130-416.zip

Thank you! I think the issue was indeed the sorting algorithm that I changed from v3 to v4 (if I remember right). I tested your files with updated version, and it seems to work correctly now, but please check yourself to make sure. Attaching the v5\_beta. Changes I made, this is from my changelog in progress:

- Rewrote the sorting algorithm, added a few helper functions to Utilities. Should fix the “subscript out of range” issue.  
  
  
- The application will no longer automatically lock Released documents (make them read-only, lock external references and enable freeze bar), but will prompt the user by default. If you prefer to always lock these references (old behavior), or to never lock, edit the value of Constants.LOCK\_RELEASED\_DOCS\_OPTION. As a result of this change, SET\_RELEASED\_VERSIONS\_FREEZEBAR and SET\_RELEASED\_VERSIONS\_LOCK\_REFS have been deprecated.  
  
  
- Additional Actions → “Delete version history” was renamed into “Set new tracking ID”, and the prompt rewritten to make it less confusing. The actual functionality did not change, but it should be clearer what this function does: it starts a new tracking history to the current document starting with revision A.1. Intended usage is when you save a tracked part with SOLIDWORKS Save As, and want to have a separate tracking history for this new file without deleting the old one.  
  
  
- Eliminated the confusing “the key is already associated with this collection” error. It happens when you save a tracked part with SOLIDWORKS Save As, but do not assign a new tracking number. The application will now recognize this, and warn the user.  
  
  
- Renamed some constants and functions.  
  
  
- Some refactoring.

Can you please check if everything is working now? Please don’t forget to change the Constants to your custom settings. If something is not working, please enable the Debug mode and make a screenshot or two.

EDIT: I see lots of people are downloading it already, so please tell me of any issues that you find. I would like this V5 to be the final version, free of any remaining bugs, because I got lots of other projects going on, and I don’t think I will have much time in the future to maintain this 😒 Besides, it has already grown past what a macro is meant for, and should be better-off re-written as an add-in… Nevertheless, if anyone wants to take over the development afterwards, feel free. Macro is open source project by definition anyway 😃  
[Version control app V5\_beta.swp](https://forum.cadmunity.com/uploads/short-url/nPnTPWgbNpzH7LrnF5hm0CHwdD9.swp) (591 KB)

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 6, 2024, 5:43pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/55 "2024-11-06T17:43:35Z")

</div>

> [@](#):
>
> …  
> Can you please check if everything is working now? Please don’t forget to change the Constants to your custom settings. If something is not working, please enable the Debug mode and make a screenshot or two.  
> …

Thanks to you!  
I’ll do extensive testing in the next couple of days and report.  
Are you using only SolidWorks’ macro editor to edit your macros?

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [November 6, 2024, 6:00pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/56 "2024-11-06T18:00:24Z")

</div>

> [@](#):
>
> Thanks to you!  
> I’ll do extensive testing in the next couple of days and report.  
> Are you using only SolidWorks’ macro editor to edit your macros?

Thank you, I’ll be waiting 🙂 And yes, I am using SolidWorks macro editor. I thought there aren’t any other IDE options, or are there..?

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 6, 2024, 8:32pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/57 "2024-11-06T20:32:15Z")

</div>

Ok, I still get this “Subscript out of range” error.  
Here’s a video:  
[sldrx.wmv](https://forum.cadmunity.com/uploads/short-url/b5QoJ8HTjqQUxko8bpgaPEIeTkH.wmv) (282 KB)  
-Nothing happens if I just use “Tools-\>Macro-\>Run…” or use the button “Run Macro”. The MainForm shows up when I assign the macro to a button. Is it because there’s a field for the method (Core.main) that cannot be specified otherwise? I lost a lot of time trying to find why the macro would do nothing as I was testing with a “Run Macro” button.  
-When I “Step into” and then F8 repeatedly, I get in a loop here:  
 ![2024-11-06 15_21_53-Microsoft Visual Basic for Applications - Version_control_app_V5 [break].png](https://forum.cadmunity.com/uploads/default/original/2X/5/5cfc2a3a4109737be3e51046513852d3746a8800.png)  
 ![2024-11-06 15_28_13-Microsoft Visual Basic for Applications - Version_control_app_V5 [break].png](https://forum.cadmunity.com/uploads/default/original/2X/a/aa82dc6bd018da838e17346bd27bff3b2e763394.png)  
-Where is defined the sentence “This will assign a new ID to the document xxxx.sldprt and reset version back to A.1. Versions associated with the old ID will remain in the repository. Are you sure to proceed?”

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [November 7, 2024, 4:10am UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/58 "2024-11-07T04:10:47Z")

</div>

Sorry you lost a lot of time with this. We will find a way to fix this issue, I promise 🙂 Okay, reviewing your video, I strongly suspect that the issue is that you have some foreign files in your Repo directory with names that do not match the convention expected by the macro: [trackingId]_[Version]_[FileName.SLDPRT]. I will add a check function to disregard such files so they don’t cause this error. But just to make sure that this is the case, can you please do the following:

1. Edit the macro, and in Constants, change the line:

```plaintext
Public Const DEBUG_ENABLED As Boolean = False

```

To

```plaintext
Public Const DEBUG_ENABLED As Boolean = True

```

1. Run the macro again from the Core.main method, and try to create a new version or anything else that causes the “Subscript out of range” error. The macro editor should pop up with an error box. Click “debug”.

2. Macro editor should pop into the function IsCurrentDocumentAlreadyInRepoWithDifferentFilename. Hower your mouse over the “fileName” variable, and it should show you the value of that variable, like in this screenshot:  
image.png  
If it does not match the [trackingId]_[Version]_[FileName.SLDPRT] convention… Then it means this is indeed the issue. Like I said, I can easily fix this, but I want to be 100% sure that this is what is causing the error for you 🙂

> [@](#):
>
> -Nothing happens if I just use “Tools-\>Macro-\>Run…” or use the button “Run Macro”. The MainForm shows up when I assign the macro to a button. Is it because there’s a field for the method (Core.main) that cannot be specified otherwise? I lost a lot of time trying to find why the macro would do nothing as I was testing with a “Run Macro” button.

Yeah, Tools-\>Run does not allow you to choose which method to run the macro from… Sometimes the macro “loses” the reference to which method is the default (entry) one, and I honestly don’t know how to specify that. I can try to re-create the macro from scratch (copy over the code), maybe that will fix it. But for now, use a macro button, or run the macro from the macro editor by pressing F5 and then choosing the correct entry method (Core.main).

> [@](#):
>
> -When I “Step into” and then F8 repeatedly, I get in a loop here:  
> 2024-11-06 15\_21\_53-Microsoft Visual Basic for Applications - Version\_control\_app\_V5 [break].png  
> 2024-11-06 15\_28\_13-Microsoft Visual Basic for Applications - Version\_control\_app\_V5 [break].png

This is a loop that traverses through all of your files in the repo directory, you probably have quite a lot of them, that is why it appears to get stuck. You can add a breakpoint after the loop and press F5 to run the macro until that breakpoint, it will save you a lot of time.

> [@](#):
>
> -Where is defined the sentence “This will assign a new ID to the document xxxx.sldprt and reset version back to A.1. Versions associated with the old ID will remain in the repository. Are you sure to proceed?”

This is from AdditionalActionsForm:  
image.png  
For future reference, since you’re making quite a few changes to this macro, you can find things easier if you do a global search with Ctrl+F and set the search scope to “Current project”:

 ![image.png](https://forum.cadmunity.com/uploads/default/original/2X/9/9db7b8757c625a24897de0e5d6b6cb8ae95c2d26.png)  
Let me know the results of that first test. And thanks!

---

<div class="post-metadata">

**Author:** ![mgibeault](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/mgibeault/32/5147_2.png) [@mgibeault](https://forum.cadmunity.com/u/mgibeault)\
**Post date:** [November 7, 2024, 2:20pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/59 "2024-11-07T14:20:48Z")

</div>

Well, thanks to you!!!  
That’s certainly the problem, when I hover over “filename” it shows “231130-450.sldprt”. So it’s a file that was copied there without the macro.  
I can enforce a “do not touch directly” policy to the Repo folder but I cannot guarantee it will be followed in the long term.

Edit: I cleaned-up the Repo folder and it works!!!

For the problem of the “Run macro”, don’t spend time on this. It’s a problem with SolidWorks’ implementation.

For editing the macro I copy the text into Notepad++. I can have 2 files side-by-side with synchronized scrolling. And it has VB code highlighting.

---

<div class="post-metadata">

**Author:** ![laukejas](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/laukejas/32/6938_2.png) [@laukejas](https://forum.cadmunity.com/u/laukejas)\
**Post date:** [November 7, 2024, 4:55pm UTC](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557/60 "2024-11-07T16:55:02Z")

</div>

> [@](#):
>
> Well, thanks to you!!!  
> That’s certainly the problem, when I hover over “filename” it shows “231130-450.sldprt”. So it’s a file that was copied there without the macro.  
> I can enforce a “do not touch directly” policy to the Repo folder but I cannot guarantee it will be followed in the long term.
> 
> Edit: I cleaned-up the Repo folder and it works!!!
> 
> For the problem of the “Run macro”, don’t spend time on this. It’s a problem with SolidWorks’ implementation.
> 
> For editing the macro I copy the text into Notepad++. I can have 2 files side-by-side with synchronized scrolling. And it has VB code highlighting.

Thank you for confirming, I thought that was it 🙂 I added a check to disregard such files so you don’t have to enforce that policy, but I suspect there is still plenty of ways to break my macro, I didn’t include a lot of error checking because of how limited VBA is and how annoying it soon becomes to maintain a project of such complexity in that macro editor. I too sometimes use Notepad++ for refactoring, but still have to copy the code back over to the VBA editor afterwards… Visual Studio is such a relief to work in compared to this. Sad that we can’t use it for writing and debugging macros.

Anyway, I will test that macro further for a few more days, maybe do some clean up and further refactoring, and then I will post it here.

[Previous page](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557.md?page=2)

[Next page](https://forum.cadmunity.com/t/revision-control-app-macro-release/1557.md?page=4)
