Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to import a file based on one criteria. The importing file title has to match the first 12 characters of the file name that is performing the import.
For example, File A performing the import, has to match File B's title for its first 12 characters for it to perform the import.
So this situation would work:
11Jan2018 AB File A.xlsm
11Jan2018 AB File B.xlsm
This situation would not work:
12Jan2018 AB File A.xlsm
11Jan2018 AB File B.xlsm
If they are NOT in agreement then a message box appears and says, "Files don't match".
Then Exit Sub.
If they have a match, then the import can take place and a message box appears and says "Files match!".
Please post a code, if you can.
Thank you!
Pinaceous
I'm trying to import a file based on one criteria. The importing file title has to match the first 12 characters of the file name that is performing the import.
For example, File A performing the import, has to match File B's title for its first 12 characters for it to perform the import.
So this situation would work:
11Jan2018 AB File A.xlsm
11Jan2018 AB File B.xlsm
This situation would not work:
12Jan2018 AB File A.xlsm
11Jan2018 AB File B.xlsm
If they are NOT in agreement then a message box appears and says, "Files don't match".
Then Exit Sub.
If they have a match, then the import can take place and a message box appears and says "Files match!".
Please post a code, if you can.
Thank you!
Pinaceous