Copy an Excel file to the network and save it.

  • Thread starter Steven Britton via AccessMonster.com
  • Start date
S

Steven Britton via AccessMonster.com

I have a DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9 that
makes a copy on my harddrive, then I format it. I would then like to make
another copy on the network and save that copy. How?
 
J

JaRa

You can do this by using VBA

by using the vba function filecopy check help file

FileCopy Statement
Copies a file.
Syntax
FileCopy source, destination
The FileCopy statement syntax has these named arguments:


Just set a reference to the Microsoft Scripting Runtim and then you can use
the following Code:

public sub CopyFile(Source as string,Destination as string)
dim fso as new Scripting.FileSystemObject

fso.CopyFile Source,Destination
set fso = nothing

end sub

- Raoul
 
Top