molsonlabatt
New Member
- Joined
- Jul 25, 2012
- Messages
- 14
Hi,
I have been running in circles trying to find a way to get this to work.
What I would like to be able to do is have a macro that can import a column of data from multiple CSV files (that each have the same name) into a spreadsheet. Details below:
1. Have a dialog box to prompt the user to enter the main folder (will change everyday) e.g.:
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.AllowMultiSelect = True
''Start in
.InitialFileName = "C:\UsersDesktop\HPLC\13DEC02
2. Have the macro then look through the multiple sub folders (within main folder) for the file name "REPORT01.CSV" and copy a column of data from that file into a spreadsheet. This file appears in each subfolder.
3. Too keep track of were the data came from, I need the subfolder name (e.g. BLK1.D) to appear above the column of copied data.
Thank you in advance
I have been running in circles trying to find a way to get this to work.
What I would like to be able to do is have a macro that can import a column of data from multiple CSV files (that each have the same name) into a spreadsheet. Details below:
1. Have a dialog box to prompt the user to enter the main folder (will change everyday) e.g.:
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.AllowMultiSelect = True
''Start in
.InitialFileName = "C:\UsersDesktop\HPLC\13DEC02
2. Have the macro then look through the multiple sub folders (within main folder) for the file name "REPORT01.CSV" and copy a column of data from that file into a spreadsheet. This file appears in each subfolder.
3. Too keep track of were the data came from, I need the subfolder name (e.g. BLK1.D) to appear above the column of copied data.
Thank you in advance