• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

Filesystemobject.DateCreated returns error 5 - invalid procedure call


Here's a strange item that I can't seem to solve.

My very stable vb code which has been running for many years (vb6 sp6) includes a reference to the

All of a sudden, I am getting error 5 - invalid procedure call even though the filename used when making the call is valid.
If I replace datecreated with datelastmodified, everything works fine (but I don't want the last modified date, I want the creation date)
I should also point out that this 'issue' only happens on some of the workstations but never on the development machine

any ideas?

Sample code

(everything dimensioned correctly)

set fso2= new filesystemobject
Set f = fso2.GetFile(validfilename)
msgbox f..datecreated

The 'validfilename' refers to  a valid file stored on a DVDROM .

The DVD was created by a client.  This code will execute correctly on my development system, but on a workstation that contains the compiled code only, it bombs.
This just started happending today.

Any ideas?


Mike Salonin
  • 2
1 Solution
Steve SiricaSenior Web Application EngineerCommented:
check the version of scrrun.dll on the development machine versus the machine where your having an issue.  If they're different then there's your answer.
Thanks for answering.  The scrrun.dll versions are identical on all machines.

However, I did notice that the machines having problems have a lot of files on the hard drive (in excess of 500,000) (of course not in the root directory).  Doing a cleanup seems to have cleared up the problem but I'm not sure how this is related since the filesystemobject is looking at files on a DVDROM drive when the error occurs.

Mike Salonin

Steve SiricaSenior Web Application EngineerCommented:
Glad to hear you solved the problem.  Sorry my suggestion didn't steer you in the right direction.

Good luck,

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now