tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
So i need a macro that can open a document from a folder in excel,
now the problem is i don't know what the full name of the document so i was wondering if i could get excel to open the version that was saved last?
So heres my idea,
In D10 i have the folder location
in D12 i have what the document starts with (for example "Data records")
the macro when run first checks the folder exists, if not message box "Folder missing"
then checks if there is at least one document call "Data Records" that is a XLSM doc
if there's only one, open this document,
if there are more than one, open the one with the newest saved date? (if this is not possible then dont open anything just a messagebox say "more than one" will do.
thanks
Tony
So i need a macro that can open a document from a folder in excel,
now the problem is i don't know what the full name of the document so i was wondering if i could get excel to open the version that was saved last?
So heres my idea,
In D10 i have the folder location
in D12 i have what the document starts with (for example "Data records")
the macro when run first checks the folder exists, if not message box "Folder missing"
then checks if there is at least one document call "Data Records" that is a XLSM doc
if there's only one, open this document,
if there are more than one, open the one with the newest saved date? (if this is not possible then dont open anything just a messagebox say "more than one" will do.
thanks
Tony