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

[µo°Ý] VBA ¦p¦ó±N¿ï¨úªº¸ê®Æ, ¶K¦b¤£¦Psheet¤W

[µo°Ý] VBA ¦p¦ó±N¿ï¨úªº¸ê®Æ, ¶K¦b¤£¦Psheet¤W

§A¦n
¥H¤U¬O±q¦¹ºô¯¸¤W¨Óªº........

²Ä¤@¬qµ{¦¡¬qOK¦ý.......

Sub ¥[¤JÀÉ®×()
fds = Application.GetOpenFilename("Excel Files (*.xls;*.xlsx), *.xls;*.xlsx", , , , True)
If IsArray(fds) Then
For i = 1 To UBound(fds)
   [A1].Offset(i - 1) = fds(i)
Next
End If
End Sub



½Ð°Ý¦b°õ¦æ®É¦pªG­n¿ï¾Ü©Êªº±NÀɮ׶K¨ì«ü©wªºsheet¤W(¤£¦Psheet)
¥H¤U°õ¦æµ{¦¡­n«ç»ò§ï¼g
(­ì¥»¥H¤Uµ{¦¡ ¥u¬O±N¶}±Òªº¸ê®Æ¶K¦b¦Psheet¤W,

Sub °õ¦æ()
For Each a In Range([A1], Cells(Rows.Count, 1).End(xlUp))
  With Workbooks.Open(a)
     .Sheets(1).[A1:C6].Copy ThisWorkbook.Sheets("Result").Cells(Rows.Count, 1).End(xlUp).Offset(1)
     .Close 0
  End With
Next
End Sub
ÁÂÁÂ
Ian

¦U¦ì¤j¤j
¦³¤H¥iÀ°¦£¦^´_¶Ü
´N¬O»¡
1.§Ú§Q¥Î¥H¤Uªºµ{¦¡½X(¥[¤JÀÉ®×)
µ²ªG¬Ook!¥¦¥i±N¿ï¨úªºÀɮ׸ô®|ÃK¦bexcel ¤W

2.²Ä¤G¬q(°õ¦æ)
µ²ªG¬O¤w¿ï¨úªºÀɮ׶}±Ò«á,·|¦Û°Ê©¹¤U¶K¦b¦P¤@sheet¤¤

3.§Ú§Æ±æ¦b¶}±ÒÀɮ׸ô®|«á,¦b°õ¦æ®É¥i±NÀɮשñ¦b¤£¦Psheets


¨D¸Ñ¦U¦ì¤j¤j
²Ä¤@¬qµ{¦¡¬qOK¦ý.......

Sub ¥[¤JÀÉ®×()
fds = Application.GetOpenFilename("Excel Files (*.xls;*.xlsx), *.xls;*.xlsx", , , , True)
If IsArray(fds) Then
For i = 1 To UBound(fds)
   [A1].Offset(i - 1) = fds(i)
Next
End If
End Sub



½Ð°Ý¦b°õ¦æ®É¦pªG­n¿ï¾Ü©Êªº±NÀɮ׶K¨ì«ü©wªºsheet¤W(¤£¦Psheet)
¥H¤U°õ¦æµ{¦¡­n«ç»ò§ï¼g
(­ì¥»¥H¤Uµ{¦¡ ¥u¬O±N¶}±Òªº¸ê®Æ¶K¦b¦Psheet¤W,
Sub °õ¦æ()
For Each a In Range([A1], Cells(Rows.Count, 1).End(xlUp))
  With Workbooks.Open(a)
     .Sheets(1).[A1:Z20000].Copy ThisWorkbook.Sheets("Result").Cells(Rows.Count, 1).End(xlUp)
     .Close 0
  End With
Next
End Sub
ÁÂÁÂ
Ian

TOP

¥»©«³Ì«á¥Ñ adrian_9832 ©ó 2019-12-25 00:06 ½s¿è

¶K¨ì¤£¦Pªºsheet ¬O«üpart 2¤@¥¹Åª¨ú«á
sheet1 /sheet2/sheet3/sheet4/ sheet 5/sheet6/....
³£¦P®É¥X²{  Åª¨ú¤Fªº¸ê®Æ¡H

TOP

Hello¤w¸g§ï¼g¥X¨Ó¤F
¢°¡D¥i¥ý¿ï¨ú¸ô®|
¢±¡D±N¿ï¨úªºÀɮפº®e¦Û°Ê©¹¤U¤@­Ó¢û¢ð¢í¢í¢ü¡]¢û¢ð¢í¢í¢ü¬O¦Û°Ê²£¥Í¡^¶K¤W

  Sub DATA_INPUT()

Sheets("¤u§@ªí1").Activate
fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
If IsArray(fds) Then
For i = 1 To UBound(fds)
   [A1].Offset(i - 1) = fds(i)
Next
End If

Sheets("¤u§@ªí1").Activate

For Each A In Range([A1], Cells(Rows.Count, 1).End(xlUp))
    With Workbooks.Open(A)
    Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
    .Close 0
  End With
  Next

End Sub
Ian

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD