Results 1 to 7 of 7

Thread: Error with CopyFile

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    Medford, NJ
    Posts
    4

    Exclamation Error with CopyFile

    What I'm trying 2 do is copy an autoCAD drawing from one dir 2 another. Eventually, I will need the files 2 be d/l from a website I'm working on in HTML/VBScript. 4 now, though, when I try the "CopyFile(source, destination)" line, I get an "expected =" error. Then if I try "lngReturnValue = CopyFile(s, d)" I get a "expected function or variable" error. What's the deal? It's driving me crazy b/c I know I'm close. Thanx 4 all your help!
    kristophyr

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Well when calling a function as a sub (or a sub itself) then you need to do this:

    CopyFile Source, Destination
    -NOT-
    CopyFile(Source, Destination)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    rsitogp
    Guest
    you only use () when doing something like
    Code:
    strText=InputBox("What text?")

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    Medford, NJ
    Posts
    4

    Error with CopyFile

    Thanx everybody 4 all of your help! I really appreciate it. What a lazy mistake, huh?

    -kristophyr
    kristophyr

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Yep

    Unfortunately it was a lazy mistake.

    But we all make em, huh?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6
    rsitogp
    Guest
    You learn from your mistakes!

  7. #7
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    -- Words to live by.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width