Sunsadymark
New Member
- Joined
- Apr 20, 2017
- Messages
- 1
Is there a way to open a Excel file with a certain prefix using VBA?
Like I have my files stored in a folder C:\excel files1\ with name being ABC001.xlsx and DEF002.xlsx.
I have written two macros to process them individually, which involves opening both files, process and then closing them. But I want to do my work in just one click. What should I do?
What if I have multiple folders like excel files3, excel files4, excel files5, excel files6 all with excel files named using same prefix like ABCxxx and DEFxxx. Can we write a code to be able to open them and process them all?
Like I have my files stored in a folder C:\excel files1\ with name being ABC001.xlsx and DEF002.xlsx.
I have written two macros to process them individually, which involves opening both files, process and then closing them. But I want to do my work in just one click. What should I do?
What if I have multiple folders like excel files3, excel files4, excel files5, excel files6 all with excel files named using same prefix like ABCxxx and DEFxxx. Can we write a code to be able to open them and process them all?