Link to home
Start Free TrialLog in
Avatar of terpsichore
terpsichore

asked on

Folder size in Access VBA

Dear experts -
We had a routine that was working perfectly, but now it is choking on determining the size of a given folder with the 3 lines below.
I imagine it has something to do with the new server, which is running MICROSOFT WINDOWS SERVER 2012 R2 Datacenter.

It seems to be choking on the following lines:

    Set objfso = CreateObject("Scripting.FileSystemObject")
    Set objfolder = objfso.GetFolder(thisname)
    tsfoldersize = objfolder.Size

Any ideas? Alternate approaches? (We are running a report and for each directly listed, we need to show the folder size)

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of terpsichore
terpsichore

ASKER

This pointed me in the right direction - I changed data type and also added in some error checking in case the folder didn't exist and it is now working. thank you!!