ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¨úlist ¤£ª¾¦p¦ó¥i¶i¶¥¤@¤U, ??

¨úlist ¤£ª¾¦p¦ó¥i¶i¶¥¤@¤U, ??

dear..
¥H¤U, ?¤§®Ç,,«ü¥O,,,¤£ª¾,¦p¦ó.¥i¶i¶¥¤@¤U,
if  a2 ¬°bbb ..  ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a2]
         ¬°ccc..     ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a5]

¤£ª¾,¦p¦ó°µ, -->

¥Øªº:¨úlist ¤§¤å¦rÀÉ,±Æ¦C¤£¦P,¦³¦n´XºØ:



Sub Button1_Click()
    Dim fso As Object
    Dim objFile As Object
    Dim objFolder As Object
    Dim wbCurr As Workbook
    ThisWorkbook.Sheets("List").Select
    Application.ScreenUpdating = False
    Set fso = CreateObject("Scripting.FileSystemObject")
   
    Cells.Select
    Selection.Clear
    [a1].Select
    Dim lngCurrRow As Long
    Set objFolder = fso.GetFolder(ThisWorkbook.Path)
    lngCurrRow = 0

    For Each objFile In objFolder.Files
        If Right(objFile.Name, 4) = ".txt" Then
            Set wbCurr = Application.Workbooks.Open(Filename:=objFile.Path)
    ?        If wbCurr.Sheets(1).[a1] <> "" Then
      ?          ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a1]
      ?   ThisWorkbook.Sheets("List").[b2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a2]

        ?                        lngCurrRow = lngCurrRow + 1
          ?  End If            wbCurr.Close (False)
        End If
        Set wbCurr = Nothing
    Next

test.rar (4.5 KB)

¤w·d©w...¢â¢Ö¢á¡C¡@

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD