- ©«¤l
- 19
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 35
- ÂI¦W
- 0
- §@·~¨t²Î
- windows XP sp3
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2010-6-10
- ³Ì«áµn¿ý
- 2013-8-6
|
¦^´_ 16# GBKEE
¥Ø«e¨Ï¥Î¤W³£¨S¦³°ÝÃD
¥u¬O¿Ã¹õ·|¤@ª½°{¤@ª½°{
¯à°÷¦bµ{¦¡°õ¦æ®É°±¤î§ó·s¿Ã¹õ¶Ü
°õ¦æ§¹¦A§ó·s¿Ã¹õ
¤£µM¤@ª½°{²´·ú¦nµh
Sub Ex()
Dim Rng As Range, NameRng As Range, CopyRng As Range, E As Range
Set NameRng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(5).[A2:A20].SpecialCells(xlCellTypeConstants) '¤H¦Wªº½d³ò ©Î¬O §¹¾ãªº¸ô®|ÀɮצWºÙ
Set Rng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(1).[a3]
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
If Rng.End(xlDown).Row = Rows.Count Then
Set Rng = Rng.End(xlDown).End(xlUp).Offset(1)
Else
Set Rng = Rng.End(xlDown).Offset(1)
End If
.Close False
End With
Next
End Sub |
|