I would like to have suggestions for a VBA code that does this:
Generate an Excel file for each contract number. When copying the contract number to a specific cell in the workbook, a personalized Excel file is created for this contract number. I would thereafter like to save this personalized file in a distinct Excel file. The Excel file must be saved in a specific folder which path could be referred to the contract number, that is the information about the specific path would already be in the "model" Excel file.
Therefore, the steps would be :
1- In the sheet, "Info_base", copy the 1st contract number on top of a list which is saved on the range of cells A3:A22,
2- Copy this contract number, on another sheet "Formulaire", at cell D22. With this copy a personalized file is being created for that contract number.
3- Save this personalized file in a specific subfolder (where path could be a field in the "Info_base" database.) The name of the file would look like:
2021-01_Analysis_(Name of group)_#(contract number)(Note : Group name is also a field in the "Info_base" database.
4- Once the personalized Excel file had been saved, need to go back to the model "Excel" file.
5- Then redo steps 1 to 4, for each contract number (19 times)
I don't think it is so complicated for anyone who is a bit more used to code VBA loop than me. I think we might need to declare the range of cells where "Info_Base" is as a 2 dimensions table...but maybe not ?
Anyway, I would appreciate an helping hand on this. Thanks in advance !
Some questions for you:
1) What do you mean by "personalized file"? Is that a new file with the "Formulaire" sheet copied into it?
2) Where are the subfolder names located on the "Info_base" sheet?
3) Where are the Groupnames located on the "Info_base" sheet?