Good morning everyone.
I have a document named "Jan 27 MOCAS.xls". (the Jan 27 is replaced with the current date of whatever day the document is created.) I have some code that I would like to have look in the same folder this document is located, and then find the file in there that has the same name, except without the MOCAS. In otherwords, there is a file called Jan 27.xls in that same folder, and I want the code to go find that file.
I can't set the code to just always look for Jan 27.xls, because depending on the day the file was created, it will be different. If there is some way to define a variable that is equal to "Jan 27 MOCAS.xls" and just strip off the *space*MOCAS off of it, that would be ideal. Any ideas?
Thanks,
Nate
I have a document named "Jan 27 MOCAS.xls". (the Jan 27 is replaced with the current date of whatever day the document is created.) I have some code that I would like to have look in the same folder this document is located, and then find the file in there that has the same name, except without the MOCAS. In otherwords, there is a file called Jan 27.xls in that same folder, and I want the code to go find that file.
I can't set the code to just always look for Jan 27.xls, because depending on the day the file was created, it will be different. If there is some way to define a variable that is equal to "Jan 27 MOCAS.xls" and just strip off the *space*MOCAS off of it, that would be ideal. Any ideas?
Thanks,
Nate