|
-
Oct 27th, 2005, 05:23 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Invalid use of property?
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").
Last edited by Zeratulsdomain; Oct 27th, 2005 at 08:01 PM.
-
Oct 27th, 2005, 06:16 PM
#2
Frenzied Member
Re: 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?
-
Oct 27th, 2005, 06:20 PM
#3
Fanatic Member
Re: Invalid use of property?
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
-
Oct 27th, 2005, 06:40 PM
#4
Re: Invalid use of property?
then try it again paralinx, you need to kill the second path first, i think.
-
Oct 27th, 2005, 07:02 PM
#5
Re: Invalid use of property?
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
-
Oct 27th, 2005, 07:55 PM
#6
Re: Invalid use of property?
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
-
Oct 27th, 2005, 08:00 PM
#7
Thread Starter
Hyperactive Member
Re: Invalid use of property?
oops, sry my bad...
I had named my sub FileCopy (which just happend to be the very line of code vb uses )
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
|