- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-1-21 13:56 ½s¿è
¦^´_ 5# PJChen - Option Explicit
- Sub Acopy_from_Multi_format()
- Dim Wb(1 To 2) As Workbook, xS As Integer, Ar1(), Ar2()
- '*** «ü©wµ¹ÅܼÆ: ¦pµ{§Ç«Ü¤j קï¦WºÙ®É¤£¥²¦bµ{§Ç¤¤¤@¤@§ó§ï ***
- Dim Ar(1 To 2)
- Set Wb(1) = Workbooks("2011 BCMart Multi-Format.xlsx")
- Set Wb(2) = Workbooks("VBA Cluster.xlsm")
- Ar1 = Array("BCM±±ºÞ", "Factory xsip", "Chart") '¸m¤J°}¦C
- Ar2 = Array("A:CZ", "A:AI", "A:AP") '¸m¤J°}¦C
- For xS = 0 To UBound(Ar1) '-> Array("BCM±±ºÞ", "Factory xsip", "Chart")
- With Wb(1).Sheets(Ar1(xS)) '¥N¤J Ar1(xS)
- .Columns("A:CZ").Hidden = False
- Intersect(.UsedRange, .Range(Ar2(xS))).SpecialCells(xlCellTypeVisible).Copy
- ''¥N¤J Ar2(xS) : ¥ý°µ½Æ»sªº°Ê§@
- With Wb(2).Sheets(Ar1(xS)) '¥N¤J Ar1(xS)
- .Range("A1").PasteSpecial Paste:=xlPasteAll '§¹¥þ½Æ»s
- .Range("A1").PasteSpecial Paste:=xlPasteValues '½Æ»sÈ
- .Columns("A:CZ").Hidden = False
- End With
- End With
- Next
- Application.CutCopyMode = False
- 'CutCopyMode ÄÝ©Ê: ³]©w [°Å¤U] ©Î [½Æ»s] ¼Ò¦¡ªºª¬ºA¡C¥i¬° True¡BFalse ©Î¤@Ó XLCutCopyMode ±`¼Æ¡A¦p¤U¦Cªí®æ©Ò¥Ü¡CŪ/¼g Long¡C
- End Sub
½Æ»s¥N½X |
|