Kenapa tidak membaca data berikutnya

  1. 5 tahun lalu

    All mohon bantuannya
    Source file ada 2 data tetapi destinationnya cm ada 1 data
    Source file
    Sheet3 c2 = meiby
    C3 = Dodi

    Sheet 1 S2 = kosong
    S3 = file.txt

    Berikut makronya

    Sub copy12()

    Dim source_file As String

    Dim source_folder As String

    Dim destination_folder As String

    'Dim source2_file As String

    Dim dx As Long

    Set fso = CreateObject("scripting.filesystemobject")

    With Sheet1

    For dx = 2 To 10000

    If Len(Sheet3.range("c" & dx)) Then

    source_file = Sheet3.range("c" & dx)

    source_folder = .range("j11")

    'If Len(.Range("d" & dx)) Then

    destination_folder = .range("s" & dx)

    'source2_folder = .Range("D" & dx)

    fso.copyfile (source_folder & source_file), (destination_folder), True

    Else

    Exit For

    End If

    'End If

    Next

    End With

    'MsgBox " selesai"

    End Sub

  2. Berikut excelnya

 

atau Mendaftar untuk ikut berdiskusi!