FileSystemObject Type mismatch

  • Thread starter NuBie via AccessMonster.com
  • Start date
N

NuBie via AccessMonster.com

Given this declaration i got runtime error: 13 Type Mismatch.
variable origin is a string containg the folder location.


Dim fs As New FileSystemObject
Dim f As Folder
Dim afile As File
Set f = fs.GetFolder(origin)

So.. what's wrong why i get type mismatch?

Thanks
 
N

NuBie via AccessMonster.com

Dim fs As New FileSystemObject
' replace this line Dim f As Folder with
Dim f As Scripting.Folder
Dim afile As File
Set f = fs.GetFolder(origin)

Thread resolved!!!
someone may find this useful!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top