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

    aTTENDING TIME OF PROCESS (2000 sr 1)

    Sub UNIONE_FILE_SENZA_BLANK_OK()

    Dim FolderPath As String

    Shell "cmd /c copy E:MACROFASCIANO*.txt E:MACROFASCIANOPROVA.txt"

    For i = 1 To 100000
    Next i

    FolderPath = "E:MACROFASCIANO"

    Application.Workbooks.Open FolderPath & "PROVA.TXT"
    ActiveWorkbook.Sheets(1).Range("A:A").Sort Key1:=ActiveWorkbook.Sheets(1).Range("A1"), Order1:=xlAscending
    ActiveWorkbook.SaveAs Filename:=FolderPath & "PROVA001.txt", FileFormat:=xlText
    ActiveWorkbook.Close False

    End Sub

    this macro make a joined file.
    The process of:
    Shell "cmd /c copy E:MACROFASCIANO*.txt E:MACROFASCIANOPROVA.txt"
    not is faster and the next instruction take "file missing" because the file not is still created...
    I would want to insert a command to addemding the process and after go to the nex line...
    actually i have insert a for next to attending the end of the process...

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

    Re: aTTENDING TIME OF PROCESS (2000 sr 1)

    See <post#=427398>post 427398</post#> for a function you can use to test if a file has been created.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ATTENDING TIME OF PROCESS (2000 sr 1)

    ... perfect!

Posting Permissions

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