Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filecopy? 1

Status
Not open for further replies.

jonclark

MIS
Jul 2, 2001
3
US
I keep on getting the following error when i use filecopy;
Runtime error '76';
Path not Found
Here is the code that i am trying;
Private Sub cmdOK_Click()
Dim sfile_dir As String
dim sfile_name as string
sfile_dir = "C:\temp\catimp\"
sfile_name = "G:\wes\file.exp"
If (Dir(sfile_dir & "catimp")) = "catimp" Then
sfile_check = True
Else
MkDir sfile_dir
End If
intMsg = MsgBox(sfile_name)
FileCopy sfile_name, sfile_dir
End Sub
Please help
Jon
 
John,
That cleaned up alot but i still get the error when vb hits the filecopy command.
Any other ideas?
Jon
 
I figured it out.
My problem is that i was copying file G:\wes\xxx to a directory. when i renamed the file it worked perfectly.
Thanks for having a great database to search from
Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top