Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    COPY FILE (2000 sr-1)

    i want to overwrite existing file, without confirm message, is correct the statement (chkOverwriteFiles.Value = vbChecked), becuse have error:

    Sub COPIA_PRINTER()
    Dim fso As FileSystemObject
    Dim target_folder As Folder
    Dim DA_SERVER As String
    Dim A_COM_LOCALE As String

    DA_SERVER = "GCD01F4500DATIPUBBLICAAPPLICAZIONISERVIZIO_PRT.EP P"
    A_COM_LOCALE = "C:APPLICAZIONISERVIZIO_PRT.EPP"

    ' COPIA_DEI_FILE
    Set fso = New FileSystemObject
    fso.CopyFile DA_SERVER, A_COM_LOCALE ', (chkOverwriteFiles.Value = vbChecked)
    MsgBox "Ok"
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: COPY FILE (2000 sr-1)

    Use

    fso.CopyFile DA_SERVER, A_COM_LOCALE, True

Posting Permissions

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