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

VBA ¦p¦ó±N¿ï¨úªº¸ê®Æ¡]¬Y­Ó¢û¢ð¢í¢í¢ü¡^, ¶K¦b·s¶}±Òªº¤£¦Psheet¤W

VBA ¦p¦ó±N¿ï¨úªº¸ê®Æ¡]¬Y­Ó¢û¢ð¢í¢í¢ü¡^, ¶K¦b·s¶}±Òªº¤£¦Psheet¤W

¢Ö¢í¢ô¢ô¢÷¡@¦U¦ì¤j¤j

¥H¤U¬O±NExcel file A ¤¤ªº©Ò¦³sheets¡@¡]¢í£A¡G¢û¢ð¢í¢í¢ü¢°¡þ¢û¢ð¢í¢í¢ü¢±¡D¡D¡D¡A³£©I¥s¨Ã¶K¤W¦b°õ¦æÀÉExcel file B¤W¡D
·Q½Ð°Ý­Y§Ú¥u­nFile B ¤¤ªº¬Y­Ósheet , ¤Î³o­Ósheet¤¤ªº¬Y¤@¬q­È(ex: sheet1ªº range(Bxx :Bxx)and rangf(Dxx,Dxx)'©I¥s¨Ã¶K¤W¦b°õ¦æÀÉExcel file B¤W ,½Ð°Ý¸Ó¦p¦ó§ï¼g????

·PÁ«ü±Ð
  1. Sub DATA_INPUT()

  2. fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
  3.                                 
  4. If IsArray(fds) Then
  5. For i = 1 To UBound(fds)
  6.    [A2].Offset(i - 1) = fds(i)
  7. Next
  8. End If

  9. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  10. On Error Resume Next  '''''' ¿ù»~¸õ¹L
  11. For Each a In Range([A2], Cells(Rows.Count, 1).End(xlUp))
  12.   With Workbooks.Open(a)
  13.       .Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
  14.      .Close 0
  15.   End With
  16. Next
  17. On Error GoTo 0 '''''''''''''¿ù»~¸õ¹L'''''''''''
  18. Sheets("¤u§@ªí1").Activate
  19. Range("A1").Select
  20. Columns("A:A").EntireColumn.AutoFit
  21. Sheets("¤u§@ªí1").Activate

  22. End Sub
½Æ»s¥N½X
Ian

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD