PHOTOSONTHESPOT
asked on
Filesystemobject.DateCreated returns error 5 - invalid procedure call
Hi.
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
filesystemobject.datecreat ed
property.
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?
Thanks
Mike Salonin
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
filesystemobject.datecreat
property.
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?
Thanks
Mike Salonin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to hear you solved the problem. Sorry my suggestion didn't steer you in the right direction.
Good luck,
Steve
Good luck,
Steve
ASKER
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