fiftimedun
New Member
- Joined
- Oct 13, 2009
- Messages
- 47
New to VBA and this is over my head, any assistance would be greatly appreciated:
I have multiple workbooks that i need imported into a single workbook but each workbook must go on to its own tab. I would like the operation to give you the option to search for the folder that contains all of the workbooks (they will be in the same folder, but the folder will change)
Notes:
-Workbooks have a date at the end so the end must be wildcard
-Workbooks must be able to be assigned to copy their data to a tab that has a different name than the origin workbook, eg. workbook "Red", imports to tab "Seven"
--i can manually name and assign the workbook/tab names or provide a sample of what i am working with (there are 21 reports to import, each to seperate tabs)
Here is what i have to search for the folder, but i don't really understand how it works or what to do with it...
Thank you all in advance for your time!
I have multiple workbooks that i need imported into a single workbook but each workbook must go on to its own tab. I would like the operation to give you the option to search for the folder that contains all of the workbooks (they will be in the same folder, but the folder will change)
Notes:
-Workbooks have a date at the end so the end must be wildcard
-Workbooks must be able to be assigned to copy their data to a tab that has a different name than the origin workbook, eg. workbook "Red", imports to tab "Seven"
--i can manually name and assign the workbook/tab names or provide a sample of what i am working with (there are 21 reports to import, each to seperate tabs)
Here is what i have to search for the folder, but i don't really understand how it works or what to do with it...

Code:
Sub test()
MsgBox "Please navigate to the folder containing the files to process."
With Application.FileDialog(msoFileDialogFolderPicker)
.Show
On Error Resume Next
fileLocation = .SelectedItems(1)
End With
If fileLocation = "" Then
End
End If
End Sub
Thank you all in advance for your time!