Macro Help

It's working!!!

Thank you Lucas!!

Your macro works perfectly, I was the one who created a conflict...

In my property questionnaire, I already had a "Client" property.

I didn't touch it during my tests, so it remained white.

And the code error came from the fact that I was testing the macro without having saved the part before.

 

In short, thank you:p

#LucasProVba ^^

 

 

On the other hand, you shouldn't add other subfolders, or add a line of code, but you should do several macros per number of levels right? otherwise error.

 

I promise I'll take lessons soon...^^

Indeed, if you have a sub-folder in your client file, it doesn't work anymore! But another macro could work in any case! Another question?

And I had thought that you might already have a property named client that would conflict, but I forgot to say it! It works, that's the main thing (even if the code is not super optimized).

1 Like

Ag that yes it works, the rest, I would tell you that I don't care^^

 

In my opinion, it would be better to make a macro to retrieve the name of the folder where the part is saved as "deal" properties and the top-level folder for "Client".

 

Because here we are doing the opposite, right? We take the complete path and then we go to the left (2nd sub-folders, 3rd etc....)

Yes, you never told me that there were sub-files. And I didn't know if the beginning of the path was always the same.
1 Like

At the same time, I haven't explained to you the why and how...

 

But hey, I guess it's not too complicated to set up and above all it replaces many add-ons that can be replaced by marcos =)

 

Good jobLucas! ;)

1 Like