I have a VBA module in Access 2007 that does a TransferSpreadsheet ac Export running a query for a particular "division" and places the results in a worksheet. Then it does alot of polishng code to clean up the appearance and places final results in another worksheet and then saves to a directory with specific file name. These are the final 2 statements:
savefile1 = SavenameDiv & "Appliances " & textdate2 & fileext
.ActiveWorkbook.SaveCopyAs savefile1
What I want to do is then copy that ActiveWorkbook into another workbook. Then I'll go through the above cleanup for the next division and when I get to the above 2 statements for that division, I want to append that divisions data in the ActiveWorkbook to the same workbook the previous division did and I will continue that for another 7 divisions. Then once they are all done, I will save that combined workbook to a different location. I will do this twice creating 2 very large workbooks containing multiple divisions while at the same time creating multiple workbooks for the individual divisions.
I'm hoping someone could provide the code that is needed to accomplish this. I'm thinking it should be very little code. I'm just not sure what code is required to create the 2 new workbooks in a separate excel session while another one is doing the first part.
Appreciate some assistance – thanks!
savefile1 = SavenameDiv & "Appliances " & textdate2 & fileext
.ActiveWorkbook.SaveCopyAs savefile1
What I want to do is then copy that ActiveWorkbook into another workbook. Then I'll go through the above cleanup for the next division and when I get to the above 2 statements for that division, I want to append that divisions data in the ActiveWorkbook to the same workbook the previous division did and I will continue that for another 7 divisions. Then once they are all done, I will save that combined workbook to a different location. I will do this twice creating 2 very large workbooks containing multiple divisions while at the same time creating multiple workbooks for the individual divisions.
I'm hoping someone could provide the code that is needed to accomplish this. I'm thinking it should be very little code. I'm just not sure what code is required to create the 2 new workbooks in a separate excel session while another one is doing the first part.
Appreciate some assistance – thanks!