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

[µo°Ý] ¬O§_¦³¤j¤j¥i¥HÀ°§Ú§ïªí³æ¸ÌªºVBA

[µo°Ý] ¬O§_¦³¤j¤j¥i¥HÀ°§Ú§ïªí³æ¸ÌªºVBA



¥D­n¬O¸òÀɮפº¥k¤W¨¤ªº¥X³fªí³æ¸ò ¾É¤J²£«~³W®æªº«ö¶s¤j¦P¤p²§

¥u¬O¾É¤J²£«~³W®æ¤@©w­n®Ø¿ï²£«~½s¸¹¤~¥i¥H¦³§@¥Î¬O§_¦³¿ìªk§ï¦¨®Ø¿ï­þ¤@Äæ³£¥i¥H
¦Ó¥B¾É¤J²£«~³W®æ¨ìsheet2®É²£«~½s¸¹¸ò²£«~¦WºÙ¦pªG¥u¦³¼Æ¦r´N·|µL®Ä ¤£ª¾¨ì¦ì¬Æ»ò

¤p§ÌVBA¤£¤j¦æ¬O§_¦³¤j¤j¥iÀ°¤p§Ì§ï¥k¤W¨¤ªº ²£«~¬ö¿ý ´ú¸Õ¬ö¿ý ²§±`¬ö¿ýªºVBA
¤j­P¤W¤]¸ò¾É¤J²£«~³W®æ¤@¼Ë®Ø¿ï½d³ò¦Û°Ê±N½d³ò¤º«ü©wÄæ¦ì §ä´M³Ì«á¤@µ§¸ê®Æªº¤U¤@¦C¥H­Èªº¤è¦¡¶K¤W¥t¥~¤@­Ó¤u§@ªí
¥t¥~¤T­ÓÀɮקƱæ¶K¤WªºÄæ¦ì¦³KEY´Xµ§¸ê®Æ
¥u¬O¦]¬°³o¤T­ÓÀÉ®× ¨C­Ó¤ë³£·|¶}¤@­Ó·sªº ¬O§_¦³¿ìªk°µ¤@­Ó«ü©w¸ô®|ªº¤è¦¡¦bªí³æ¤¤©ÎªÌ¹³Àɮפ¤¦A°Ñ·ÓÄæ¸ÌKEY¤J¸ô®|´N·|«ü©w¨ì³o­ÓÀÉ®×
«ô°U¤j¤j ·P®¦
ND¥Í²£°Ï.rar (30.59 KB)

¦^´_ 1# a31075ha


    Option Explicit
Dim Show_File As Object
Sub ¥[¤JÀÉ®×()
    Dim I As Integer
    Set Show_File = Application.FileDialog(msoFileDialogOpen)
    With Show_File
         .InitialFileName = "D:\*.xls"  '«ü©w xlsÀÉ
         .AllowMultiSelect = True
         .Show
         If .SelectedItems.Count > 0 Then
            For I = 1 To .SelectedItems.Count
             Cells(I, 2) = .SelectedItems(I)
         Next
         End If
    End With
End Sub
Sub °õ¦æ()
    Dim I As Integer, Sh As Worksheet, Rng As Range
    Set Sh = Workbooks("¶K¤W.xlsm").Sheets(1)
    With Show_File
        If .SelectedItems.Count > 0 Then
            For I = 1 To .SelectedItems.Count
                Set Rng = Sh.Cells(Sh.Rows.Count, "A").End(xlUp).Offset(1)  'AÄæ³Ì«á¦³¸ê®Æ¦Cªº¤U¤@¦C
                With Workbooks.Open(.SelectedItems(I))
                    .Sheets(1).Range("A1:C6").Copy Rng
                    .Close 0
                End With
            Next
         End If
    End With
   Sh.Parent.Save   ' ¶K¤W.xlsm  ¦sÀÉ
End Sub

Ãþ¦ü¹³³o¤@¬q³o¼Ë ¥u¬O¶K¤Wªº¤è¬O§Æ±æ¸ò¾É¤J²£«~³W®æªº¤è¦¡¤@¼Ë ¥u¦³®Ø¿ï½d³ò¤ºªº«ü©wÄæ¦ì¶K¤W

TOP

¥»©«³Ì«á¥Ñ a31075ha ©ó 2014-3-4 15:42 ½s¿è

ÂI¿ï">" ¿ï¾Ü­n¶KªºÀÉ®×
001.jpg


®ÇÃä²£¥Í¸ô®|


«ö¤U«ö¶s±N­è­è®Ø¿ï½d³ò¸Ìªº¸ê®Æ¶K¹L¥h­è­è¿ï¾ÜªºÀÉ®×


¶K¹L¨Óªº¸ê®Æ¬O­è­è®Ø¿ï½d³ò¸Ì³o­ÓÀɮצ³ªºÄæ¦ìªº¸ê®Æ¤~¶K¹L¨Ó¨Ã¥H­Èªº¤è¦¡


¦Ó¨C¤@µ§¸ê®Æ¤@ª½©¹¤U¶K¤W¨Ã¦sÀÉ
¦Ó¨C­ÓÀɮ׳£·|«O«ù¶}±Òªºª¬ºA¤U
·P®¦
¦Ó¤U¤èªº ´ú¸Õ¬ö¿ý¸ò²§±`¬ö¿ý³£¬O¬Û¦P¼Ò¦¡ (Äæ¦ì¤£¦P)

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD