Folder Object and Access 2007

  • Thread starter Thread starter CSIMechanicsville via AccessMonster.com
  • Start date Start date
C

CSIMechanicsville via AccessMonster.com

I was wondering if anyone else has had any problems in using the Folder /
FileSystemObject objects in VBA in Access 2007? I have a line of code that
has worked without complaint in A2000 & A2003, but when A2007 executes it, it
gives a '13 - Type Mismatch' error.

The line of code that is causing trouble in A2007 is:
Set fo = f.GetFolder("C:\MyStuff") [Where fo is a Folder object & f is a
FileSystemObject].

Any input is appreciated.

Thank you.
 
CSIMechanicsville said:
I was wondering if anyone else has had any problems in using the Folder /
FileSystemObject objects in VBA in Access 2007? I have a line of code that
has worked without complaint in A2000 & A2003, but when A2007 executes it, it
gives a '13 - Type Mismatch' error.

The line of code that is causing trouble in A2007 is:
Set fo = f.GetFolder("C:\MyStuff") [Where fo is a Folder object & f is a
FileSystemObject].

Any input is appreciated.

Thank you.

Try dismabiguating, i e in stead of

dim fo as folder

use

dim fo as scripting.folder
 
Back
Top