Board logo

¼ÐÃD: ¸ÑBug [¥´¦L¥»­¶]

§@ªÌ: oliwa    ®É¶¡: 2016-9-25 20:12     ¼ÐÃD: ¸ÑBug

¦³¤W¦Ê­ÓÀÉ®× , ¦pªþ¥ó¤¤ªº"¤WµØ" , "¥úÜg"ÀÉ®× ,
ÀÀ¥H¦p¤Uµ{¦¡§Û¼g¦Ü"ReceiveList"ÀÉ®× ,

¥Ø«e´ú¸Õ®É Msgbox file ¥¿½T , ¦ý MsgBox LastRow «oÅã¥Ü 1048576 , ¥Bµ{¦¡¤¤Â_ ,
½Ð°Ý¨ºùئ³°ÝÃD§r ? TKS .


Sub M1()

    Dim path$, file$, first$
    path = "C:\Users\oliwa\Desktop\5-¦¨¥»¤ÀªR¸ê®Æ\10501¶i³f\"
    file = Dir(path & "*.xls")
   
    If file = "" Then Exit Sub
    first = file
   
    Do
        MsgBox file
        Workbooks.Open (path & file)
        StartRow = Range("A1:A10").Find("µo²¼¸¹½X").Row + 1
        CopyRow = Cells(1, "A").End(xlDown).Row
        Range("A" & StartRow & ":K" & CopyRow).Select
        Selection.Copy
        
        Windows("ReceiveList.xlsm").Activate
        LastRow = Cells(1, "A").End(xlDown).Row
        MsgBox LastRow
        Range("A" & LastRow + 1).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        
        Windows(path & file).Activate
        ActiveWindow.Close
        
        file = Dir
   
    Loop While file <> "" And first <> file
   
    ActiveWorkbook.Save

End Sub
§@ªÌ: lpk187    ®É¶¡: 2016-9-26 01:28

¦^´_ 1# oliwa


        Do
        MsgBox file
        Workbooks.Open (path & file)
        StartRow = Range("A1:A10").Find("µo²¼¸¹½X").Row + 1
        CopyRow = Cells(65535, "A").End(xlUp).Row  '¤£­n±q²Ä¤@¦C©¹¤U§ä¡A·í²Ä¤@¦C¬OªÅ¥Õ¡A©Î²Ä¤@¦C¦³­È¡A¦Ó²Ä¤G¦CªÅ¥Õ¬O§ä¨ìªºrow ³£·|¬O³Ì«á¤@¦C¡A§ä¨ìªº´X¥G¬O1048576 ©Î 65535
        MsgBox SatrRow & "+" & CopyRowy
        Range("A" & StartRow & ":K" & CopyRow).Select
        Selection.Copy
        
        Windows("ReceiveList.xlsm").Activate
        'Sheets("¤u§@ªí1").Select
        LastRow = Cells(65535, "A").End(xlUp).Row '¦P¤W¸ÑÄÀ
        MsgBox LastRow
        Range("A" & LastRow + 1).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        
        Workbooks(file).Close '³o¬O¤£¬OÃö³¬ Wihdows ¡A¦Ó¬O­nÃö³¬¬¡­¶Ã¯
        
        
        file = Dir
   
    Loop While file <> "" And first <> file
§@ªÌ: oliwa    ®É¶¡: 2016-9-30 16:48

·PÁÂ.......
§@ªÌ: oliwa    ®É¶¡: 2016-10-1 14:02

´ú¸Õµ²ªG¯»²z·Q , ·PÁ lkp187 ªº¨ó§U !!




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)