ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] «ü©wÀÉ®× §ì¥h­ÓÀɮ׶¡¸ê®Æ

¦^´_ 10# ounmaxz
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, NameRng As Range, CopyRng As Range, E As Range
  4.     Set NameRng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(2).[A1:A16]    '¤H¦Wªº½d³ò ©Î¬O §¹¾ãªº¸ô®|ÀɮצWºÙ
  5.     Set Rng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(1).[a1]
  6.     For Each E In NameRng
  7.         With Workbooks.Open("Q:\" & E & ".xlsx")  'E=¤H¦W
  8.         'With Workbooks.Open(E)   '¦p E = §¹¾ãªº¸ô®|ÀɮצWºÙ
  9.             Set CopyRng = .Sheets(1).UsedRange.Offset(3)
  10.             Rng.Resize(CopyRng.Rows.Count, CopyRng.Columns.Count).Value = CopyRng.Value
  11.             If Rng.End(xlDown).Row = Rows.Count Then
  12.                 Set Rng = Rng.End(xlDown).End(xlUp).Offset(1)
  13.             Else
  14.                 Set Rng = Rng.End(xlDown).Offset(1)
  15.             End If
  16.             .Close False
  17.         End With
  18.     Next
  19. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# GBKEE
·PÁÂGBKEEª©¥Dªº¦^µª¡I
¬Ý§¹¸Ñµª¦A¸g¹L¹ê§@¤§«á¡A
¦³Åé»{¨ìµ{¦¡½X¼g¦b¤@¯ë¼Ò²Õ¡BSheet¼Ò²Õ¤ÎThisWorkbook¼Ò²Õªº®t²§¡C
¬Ý¨Ó¬Ù²¤ªº¼gªk¯uªº­n¯S§Oª`·N¾A¥Îªº¼Ò²ÕÃþ«¬¡C

TOP

¦^´_ 11# GBKEE


    ¨Ï¥Î«á¨âºØ¸ô®|¿ï¾Ü¼Ò¦¡³£Åã¥Ü10004¿ù»~µLªk¶}±ÒÀÉ®×
    ¥Ø«eÀɮ׫ǩñ¦bºô¸ô³s½uªººÏºÐ¤º
    §Ú¨Ï¥Î¿ý»sªº¸ô®|¨Ó°µ¬°¯Á¤Þªº¸ô®|
    ®M¥Î¨ì¤j¤jªºµ{¦¡¸Ì«o§ä¤£¨ì
    ¬O§Ú¸ô®|¿ï©w¦³°ÝÃD¶Ü

ªþ¤W¨Ï¥Î¸ô®|
Q:\4A00ºûÅ@½Ò\¤º³¡±±ºÞ\ºû­×¤u®É³ø¤uºÞ²z\2012¦~\M1.xlsx

TOP

¦^´_ 13# ounmaxz
¤W¶Çµ{¦¡½X¬Ý¬Ý

TOP

¥»©«³Ì«á¥Ñ ounmaxz ©ó 2011-11-24 13:26 ½s¿è

¦^´_ 14# GBKEE

¤W¶Ç¹Ï¤ù¤ñ¸û®e©ö»¡©ú
½Ð¬Ý~~

   


¥H¤Uµ{¦¡½X¬O§Ú¥Î¿ý»sªº°õ¦æ¤WOK

Workbooks.Open Filename:="Q:\4A00ºûÅ@½Ò\¤º³¡±±ºÞ\ºû­×¤u®É³ø¤uºÞ²z\2012¦~\M1.xlsx"
    Range("A4:AD400").Select
    Selection.Copy
    Windows("123.xlsm").Activate
    Range("A3").Select
    ActiveSheet.Paste
    Windows("M1.xlsx").Activate
    ActiveWindow.Close

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-24 14:20 ½s¿è

¦^´_ 15# ounmaxz
A1:A16 ¤¤¦p¦³ªÅ¥Õ ·íµM·|¦³¿ù»~
Set NameRng = Workbooks("123.xlsm").Sheets(2).[A1:A16]   
§ï¦¨   A1:A16 ¤¤¦³¸ê®Æªºµ{¦¡½X
Set NameRng = Workbooks("123.xlsm").Sheets(2).[A1:A16].SpecialCells(xlCellTypeConstants)  
A1:A16 ¦p¥þ³¡¬OªÅ¥Õ(¨S¦³¸ê®Æ)¤]¬O¤@¼Ë·|¦³¿ù»~

TOP

¦^´_ 16# GBKEE


    ·PÁ¤j¤j¤£¹½¨ä·Ð¦aÀ°¦£
   ¥Ø«e´ú¸Õ¤w¯à¥¿±`¹B§@
    ³Q¸ô®|¸òÀɦW®Mªº¹Î¹ÎÂà:L

TOP

¦^´_ 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

TOP

¦^´_ 18# ounmaxz
µ{¦¡¶}©l®É  °±¤î¿Ã¹õ§ó·s   Application.ScreenUpdating = False
µ{¦¡µ²§ô«e  «ì´_¿Ã¹õ§ó·s  Application.ScreenUpdating = True

TOP

¦^´_ 19# GBKEE


    ·PÁÂGBKEE ¤j¤jªºÀ°¦£ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD