- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 8# ounmaxz - Option Explicit
- Sub Ex()
- Dim Rng As Range, NameRng As Range, CopyRng As Range, E As Range
- Set NameRng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(2).[A1:A16] '¤H¦Wªº½d³ò ©Î¬O §¹¾ãªº¸ô®|ÀɮצWºÙ
- Set Rng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(1).[a1]
- For Each E In NameRng
- With Workbooks.Open("Q:\" & E & ".xlsx") 'E=¤H¦W
- 'With Workbooks.Open(E) '¦p E = §¹¾ãªº¸ô®|ÀɮצWºÙ
- Set CopyRng = .Sheets(1).UsedRange.Offset(3)
- Rng.Resize(CopyRng.Rows.Count, CopyRng.Columns.Count).Value = CopyRng.Value
- Set Rng = Rng.Offset(IIf(Rng.Row = 1, 999, 1000))
- .Close False
- End With
- Next
- End Sub
½Æ»s¥N½X |
|