VB Code:
FileCopy "c:\vbfiles\a.txt", "c:\vbfiles\china\a.txt"
Comment?
In a new form that code will work (eh, it would if that file was ther ;) ), but in my current form i get that error that ("Invalid use of property").
Printable View
VB Code:
FileCopy "c:\vbfiles\a.txt", "c:\vbfiles\china\a.txt"
Comment?
In a new form that code will work (eh, it would if that file was ther ;) ), but in my current form i get that error that ("Invalid use of property").
What is the difference between the 'new' form and the 'current' form?
What makes these forms 'new' and 'current'?
Is there any other code?
I tried this on my visual basic and it worked:
VB Code:
Private Sub Command1_Click() FileCopy "C:\Documents and Settings\Owner\Desktop\test.doc", "C:\Documents and Settings\Owner\Desktop\test2.doc" End Sub
then try it again paralinx, you need to kill the second path first, i think.
Nope. This worked fine.
VB Code:
Option Explicit Private Sub Form_Load() Open "G:\text.txt" For Output As #1 Write #1, "this is a test" Close #1 FileCopy "g:\text.txt", "g:\text1.txt" FileCopy "g:\text.txt", "g:\text1.txt" End Sub
If I were a betting gnome, I'd bet that there is a PROPERTY in the class where he's trying to use the code called FileCopy..... and since it isn't qualified, it's using the closest one to it, which would be the property and not the function. But I'd only bet that if I were a betting gnome.
-tg
oops, sry my bad...
I had named my sub FileCopy (which just happend to be the very line of code vb uses :blush: )