therempels
New Member
I have this code to copy data from a range in one workbook to Sheet1 of a specific template. ( The data from Sheet1 then populates a second sheet in the template file.) Each file is created and named for the names in the dynamic named range “names1”.
This seems to work perfectly, but I need it to do two other things:
Firstly, I need it to check and see if a file has already been created with the filename, and if so, not to overwrite it, or prompt for saving.
Secondly, and most importantly, I need to find a way to have it check for an existing file, and then ONLY overwrite Sheet1 with the info from above, WITHOUT changing anything on any of the other sheets in the file, and then save and close the file. And then continue checking all the other names in the file, and either creating a new file from the template (as my code already does) OR updating only sheet1 and saving/closing the file.
I have searched for help on this, but I am new to VBA, I’m not sure where to put the add-ins and what syntax to use. Any help would be greatly appreciated!!!
This seems to work perfectly, but I need it to do two other things:
Firstly, I need it to check and see if a file has already been created with the filename, and if so, not to overwrite it, or prompt for saving.
Secondly, and most importantly, I need to find a way to have it check for an existing file, and then ONLY overwrite Sheet1 with the info from above, WITHOUT changing anything on any of the other sheets in the file, and then save and close the file. And then continue checking all the other names in the file, and either creating a new file from the template (as my code already does) OR updating only sheet1 and saving/closing the file.
I have searched for help on this, but I am new to VBA, I’m not sure where to put the add-ins and what syntax to use. Any help would be greatly appreciated!!!