|
-
Dec 19th, 2007, 11:25 AM
#1
Thread Starter
New Member
[vb6] File Copy error
Hello..
I'm kinda new here..
i'm having a problem with file copy and limits of incorrect pw.
here is my code..
the backup button:
Code:
Private Sub cmdBackup_Click()
SourceFile = App.Path & Text1
DestinationFile = App.Path & Text2
fs.CopyFolder SourceFile, DestinationFile
Set fs = Nothing
Timer1.Enabled = True
End Sub
and the browsing part is this:
Code:
Private Sub cmdBrowse1_Click()
With cd
.CancelError = False
.Filter = "All Files (*.mdb)|*.mdb"
.ShowOpen
Text1 = .FileName
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
end sub
i'm having an error msg "Bad file name or number"
i set my reference to microsoft scripting runtime
can you help me??
and also..
can you teach me how to limit the incorrect password of users??
please please help me..
badly needed for thesis..
tnx tnx..
Last edited by Hack; Dec 19th, 2007 at 11:26 AM.
Reason: Added Code Tags
-
Dec 19th, 2007, 11:29 AM
#2
Re: [vb6] File Copy error
Welcome to the forums. 
I added [code]your code goes here[/code] tags to your post as it makes reading posted code a lot easier.
How about
Code:
SourceFile = App.Path & "\" & Text1.Text
DestinationFile = App.Path & "\" & Text2.Text
-
Dec 19th, 2007, 11:46 AM
#3
Thread Starter
New Member
Re: [vb6] File Copy error
 Originally Posted by Hack
Welcome to the forums.
I added [code]your code goes here [/code] tags to your post as it makes reading posted code a lot easier.
How about
Code:
SourceFile = App.Path & "\" & Text1.Text
DestinationFile = App.Path & "\" & Text2.Text
I tried it and it's still the same error..
I'm confused..
tnx for editing my post...
Last edited by akire1212; Dec 19th, 2007 at 11:48 AM.
Reason: thanking Hack for editing my post
-
Dec 19th, 2007, 11:51 AM
#4
Re: [vb6] File Copy error
What is contained the textbox? (the exact string)
-
Dec 19th, 2007, 11:55 AM
#5
Thread Starter
New Member
Re: [vb6] File Copy error
the exact filename and directory actually..
example : "C:\My Docu\masterfile.mdb"
like that..
-
Dec 19th, 2007, 02:04 PM
#6
Re: [vb6] File Copy error
You are using CopyFolder not CopyFile; your source & destination appear to be files.
-
Dec 19th, 2007, 02:04 PM
#7
Re: [vb6] File Copy error
Is the database closed when you attempt to copy it?
-
Dec 20th, 2007, 11:20 PM
#8
Thread Starter
New Member
Re: [vb6] File Copy error
ei.. tnx now i get it!
tnx so much.,.,
i've replaced the copyfolder.
tnx xo much!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|