Forum Discussion
Comment remplacer une ressource par une autre en VBA
- Feb 10, 2022
Thanks for your help, I've tight schedule to respect, and have no time for translating and editing code to make it smaller.
I guess, I'll have to take another approach that is less tedious, althought it might require much more manual editing.
I took a quick look at your macro code but find there is too much missing (e.g. no variable declarations), too many French based variable names that don't translate to English and not enough comments. It would take too much effort on my part to figure it out such that I could make constructive comments. If you can translate your code to English, I'll have another look but otherwise I'm afraid your have to find a French based forum to get help.
John
Thanks for your help, I've tight schedule to respect, and have no time for translating and editing code to make it smaller.
I guess, I'll have to take another approach that is less tedious, althought it might require much more manual editing.
- pascalitoFeb 11, 2022Copper Contributor
Ultimate update
1. There was an error in the code logarithm, the transfer was assumed to go from assignment start (affect.Start) date until the resource change takes effect (Effectif), regardless of the assignment finish date. Therefore, it took very long since we carry over 2018 assignments, which meant 1400 itérations where ca. 40 were required.
2. Optimizing the transfer using .Value, tsv.Value = oldTsv.Value instead of tsv = oldTsv.Value
3. The type of task also impacts the performance, effort driven fixed duration tasks. vs fixed units not effort driven
Althought it is not achieved in a flash, I managed to process 15 projects in an hour, which is acceptable. - John-projectFeb 10, 2022Silver Contributorpascalito,
You're welcome and thanks for the feedback. Sorry I couldn't have offered more help.
John