File Copy Help

bag-it
02-23-2008, 03:25 PM
Hi i am writing a program that does a bunch of different things including copying files. I have a problem though, i can't get the FileCopy function to work. I have a variable called PATHD wich holds the path of the file to be copied and them Text1 holds the dir for it to be copied to. The code looks like this: [FileCopy(PATHD, Text1) = 1] (without the square brackets). I don't know if the one should be there but it kept saying "Expected =" if it wasn't hope you can help.

Thanks!

robot313
02-23-2008, 07:47 PM
Call the function without parentheses: ( and ) and without the =. When you use parentheses in VB, it expects you to have an assignment statement, for example: SomeVariable = FileCopy(blah)

Jonny
02-24-2008, 11:29 AM
or put the "Call" Keyword before your Function name like...

Call FileCopy(blah)

Stupid, really it is.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum