G
Guest
Hi,
I'm having some problem copying a file using code in the form's OnOpen event.
Here's the code snippet:
===========================================================
Dim fs, a
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.copyfile("C:\Access Databases\readme.doc", "C:\Security\")
=========================================================
I get a run-time error of "type mismatch" at "set a = ..." line.
I've tried a variation of this with
Dim fs, a as FileSystemObject
with the same results.
I've checked the MS help file and it seems like the syntax is correct.
Will appreciate any help with this.
Thanks.
-Amit
I'm having some problem copying a file using code in the form's OnOpen event.
Here's the code snippet:
===========================================================
Dim fs, a
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.copyfile("C:\Access Databases\readme.doc", "C:\Security\")
=========================================================
I get a run-time error of "type mismatch" at "set a = ..." line.
I've tried a variation of this with
Dim fs, a as FileSystemObject
with the same results.
I've checked the MS help file and it seems like the syntax is correct.
Will appreciate any help with this.
Thanks.
-Amit