Invalid outside procedure

mtairhead

Registered User.
Local time
Today, 01:23
Joined
Oct 17, 2003
Messages
138
I'm using this code:

Option Compare Database
CopyFile "C:\My Documents\Test.html", "C:\My Documents\AJICO\Test.html"
End Sub

Why do I get this error:?

Compile error: Invalid Outside Procedure
 
mt,

The CopyFile code doesn't belong to any routine. It is an orphan.

Code:
Option Compare Database

' There is no Subroutine name here !!!

CopyFile "C:\My Documents\Test.html", "C:\My Documents\AJICO\Test.html"
End Sub

Wayne
 
Thanks

Thanks, I'll try that out when I get back.

A problem that I may have further down the road: I need to be able to replace that first path (C:\My Documents\Test.html) with a web address. I've been reading a lot of the threads on this site concerning this, and they have either gone over my head, or not really provided a solution.

Will it work? I remember I did this a long time ago in Access 97, and it did not. It seems to me that this feature is only available in the dev. edition. I now have Access 2000. Is the feature available?

Thanks
 

Users who are viewing this thread

Back
Top Bottom