Hi
I would like to ask if anyone have an idea of how to copy range of cell from one workbook to another using VBA with a special condition that the source file name is different everyday. example:
Date of event: 03/04/2017
Folder 1 --> Daily Updates 20170403.xls
Folder 2 --> macroEnabledFile.xlsm
I have an idea on how to copy data from workbook to workbook using VBA but what I have problem is "What if the source file name changes everyday?" because someone updated it everyday with a different name like the date attached to it.
Date of event: 04/04/2017
Folder 1 --> Daily Updates 20170404.xls
Folder 2 --> macroEnabledFile.xlsm
How do I write my codes in such a way as to copy the cell range but referring to a dynamic source file? I suppose I can hardcode but that would defeat the purpose. Or maybe I could do smth like NAME_Dynamicdate.xls for the name of the source file. But I have no idea how I can implement it. Would be great if someone can point me in the right direction.
Thanks Much!!
I would like to ask if anyone have an idea of how to copy range of cell from one workbook to another using VBA with a special condition that the source file name is different everyday. example:
Date of event: 03/04/2017
Folder 1 --> Daily Updates 20170403.xls
Folder 2 --> macroEnabledFile.xlsm
I have an idea on how to copy data from workbook to workbook using VBA but what I have problem is "What if the source file name changes everyday?" because someone updated it everyday with a different name like the date attached to it.
Date of event: 04/04/2017
Folder 1 --> Daily Updates 20170404.xls
Folder 2 --> macroEnabledFile.xlsm
How do I write my codes in such a way as to copy the cell range but referring to a dynamic source file? I suppose I can hardcode but that would defeat the purpose. Or maybe I could do smth like NAME_Dynamicdate.xls for the name of the source file. But I have no idea how I can implement it. Would be great if someone can point me in the right direction.
Thanks Much!!