- ©«¤l
- 40
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 100
- ÂI¦W
- 0
- §@·~¨t²Î
- Win8
- ³nÅ骩¥»
- Office2013
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2014-12-9
- ³Ì«áµn¿ý
- 2021-7-2
|
¸Ñ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 |
|