Anyone can help me how to copy a file in my vb app? I've tried to use FileCopy Function having parameters source and destination. I have variables which handle the source and the destination path. I'm sure i missed something in my code.
With that, the line 'FileCopy(strSource, strDest)' is expecting "=". So i placed a to test the.
a = FileCopy(strSource, strDest)
With this code the FileCopy function still has error.
Please help. No familiar with this.
With that, the line 'FileCopy(strSource, strDest)' is expecting "=". So i placed a to trap the error.
a = FileCopy(strSource, strDest)
With this code the FileCopy function still has error.
Please help. Not familiar with this.
defines strSource as variant and strDest as string
You need to specify each variable with a type!
Code:
Dim strSource as string, strDest as string
if probably what you mean ( it shouldn't affect this routine to leave it as it is, but IMHO it is better practice to type each variable unless you have good reason not to!)
If, of course, you did intend to define strSource as variant, then I apologise!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.