Results 1 to 14 of 14

Thread: [Resolved]FileCopy Wierdness...

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    [Resolved]FileCopy Wierdness...

    VB Code:
    1. Public Sub Install_Program(Optional Path_ As String, Optional EXEName_ As String, Optional Program_Name As String, Optional Company_ As String, Optional Replace_File_ As Boolean = True, Optional Debug_Mode As Boolean = False)
    2.  
    3. On Error Resume Next
    4.  
    5. Dim Drive_Let As String
    6.  
    7. Drive_Let = Find_Drive_Letter
    8.  
    9. DoEvents
    10.  
    11. MkDir Drive_Let & ":\Program Files\" & Company_
    12. MkDir Drive_Let & ":\Program Files\" & Company_ & "\" & Program_Name
    13.  
    14. DoEvents
    15.  
    16. If Replace_File_ = True Then Kill Drive_Let & ":\Program Files\" & Company_ & "\" & Program_Name & "\" & EXEName_
    17.  
    18. DoEvents
    19.  
    20. [B]FileCopy FixPathFile(Path_, EXEName_), Drive_Let & ":\Program Files\" & Company_ & "\" & Program_Name & "\" & EXEName_[/B]
    21.  
    22. DoEvents
    23.  
    24. If Error <> 0 Then Debug.Print Err.Number, Err.Description, "Source: " & Err.Source
    25.  
    26. End Sub

    When i try to compile the bolded line gives me this error:

    "Compile Error"
    "Expected Procedure not variable."

    When i type up FileCopy the Popup text doesn't come up like it should.
    Infact FileCopy doesn't work anywhere in the module, but if i copy this code & place it somewhere else, it works fine. I don't want to rearrange my entire program... does anyone know what could be causing this?
    Last edited by Slyke; Aug 24th, 2006 at 03:00 AM.

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