Get modified date of open file

Please can someone assist me.
I need to check the modified date of a file that sometimes is open.

How can I do achieve this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
MsgBox FileDateTime("C:\My Path\test.txt")
antoniokingAuthor Commented:
Hi Martin
I have tried your suggestion but receive the following error..
Type mismatch: 'FileDateTime'

Martin LissOlder than dirtCommented:
What type of Visual Basic are you using? VBA? VB6? .Net?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

antoniokingAuthor Commented:
I'm just creating a VB Script.
Martin LissOlder than dirtCommented:
I don't do vbScript but maybe this is what you need.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
antoniokingAuthor Commented:
Thanks Martin
that's what I was using, but I need to be able to check the modified stamp whilst the file is opened.
This code doesn't allow that, it generates an error that the file doesn't exist if it's open.
Martin LissOlder than dirtCommented:
Have you tried using fso? Other than that I'm out of ideas. It also may be that you can't do what you want in vbScript, but as I said I'm not familiar with it so I don't know one way or the other.

If fso doesn't work for you then 'Request attention' and ask the moderators to add the vbScript topic to this question.
antoniokingAuthor Commented:
Thanks for this,
I have overcome my issue by copying the file using the CopyFile function and then checking the modified date of the copied file.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.