- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-25
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2018-3-6 17:20 ½s¿è
¦^´_ 10# msmplay
¸Õ¸Õ¬Ý- Sub ex()
- Dim xlPath$
- xlPath = ThisWorkbook.Path
- Set fd = CreateObject("Scripting.Dictionary")
- fa = Array("list", "CCMOP_NAME", "CCMOP", "¹w¬ùªí³æ")
- sh = Array("list³øªí", "µL¸ê®Æ", "µL¸ê®Æ2", "¦³¸ê®Æ", "¦³¸ê®Æ2", "¹w¬ùªí³æ")
- an = Array(1, 1, 2, 1, 2, 4)
- For i = 0 To UBound(fa)
- f = Dir(xlPath & "\" & fa(i) & "*.xls")
- Do Until f = ""
- If fd.exists(f) = False Then
- fd(f) = f
- With Workbooks.Open(xlPath & "\" & f)
- If i = 0 Then
- ar = Array(1)
- ElseIf i = 1 Or i = 2 Then
- ar = Array(1, 2)
- Else
- ar = Array(4)
- End If
- For j = 0 To UBound(ar)
- With .Sheets(ar(j))
- If k = 0 Or k = 5 Then Rng = "A1" Else Rng = "B1"
- .Range("A1").CurrentRegion.Copy ThisWorkbook.Sheets(sh(k)).Range(Rng)
- End With
- k = k + 1
- Next
- .Close 0
- End With
- End If
- f = Dir
- Loop
- Next
- End Sub
½Æ»s¥N½X |
|