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

[µo°Ý] Ãö³¬¸ê®Æ§ó·s³qª¾µøµ¡

[µo°Ý] Ãö³¬¸ê®Æ§ó·s³qª¾µøµ¡

¤p§Ì¼g¤F¤@­Ó¥¨¶°¡A°õ¦æ¬yµ{¤j­P¦p¤U

¿ï¨ú¦h­ÓExcelÀÉ -> ±N¿ï¨úªºExcelÀɶ}±Ò -> COPY©Ò»ÝÄæ¦ì¨ì¤@­ÓExcelÁ`ÀÉ

¦ý¦³®É­Ô·|¸I¤W¸ê®Æ§ó·sªº³qª¾µøµ¡¡A¦p¤U¹Ï


¸Õ¹LApplication.DisplayAlerts = False

¤]¨S¦³¥Î

±`±`·|¦]¦¹¹B¦æ¤¤Â_

¤£ª¾¦³µL¸Ñªk


½Ð¦U¦ì¨ó§U

ÁÂÁ¡I¡I¡I
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-3-24 07:43 ½s¿è

¦^´_ 1# li_hsien
  1. Option Explicit
  2. Sub Ex() '¤£­nCopy,µ¹­È Value*******************
  3.     Dim Rng As Range
  4.     Application.AskToUpdateLinks = True
  5.     Set Rng = Workbooks("Ex.XLS").Sheets(1).[A5:F10]
  6.     With Workbooks("TEST.XLS")
  7.         .Sheets(2).[C2].Resize(Rng.Rows.Count, Rng.Columns.Count) = Rng.Value
  8.     End With
  9. End Sub
  10. Sub Ex_All() '¦pµ¹­È Value,¤£¬O§A­nªº´Á±æ.**********
  11.     '°õ¦æ¤@¦¸,¦A­«·s§AªºÀÉ®×µ{¦¡
  12.    
  13.     'UpdateLinks ÄÝ©Ê ³]©w XlUpdateLink ±`¼Æ¡A¦¹±`¼Æ¥i«ü¥X¬¡­¶Ã¯§ó·s¤º´O OLE ³s½uªº³]©w¡CŪ/¼g¡C
  14.     'XlUpdateLinks ¥i¥H¬O³o¨Ç XlUpdateLinks ±`¼Æ¤§¤@¡C
  15.         
  16.     'xlUpdateLinksAlways ¥Ã»·§ó·s«ü©w¬¡­¶Ã¯ªº¤º´O OLE ³s½u¡C
  17.     'xlUpdateLinksNever ¥Ã»·¤£§ó·s«ü©w¬¡­¶Ã¯ªº¤º´O OLE ³s½u¡C
  18.     'xlUpdateLinksUserSetting  ®Ú¾Ú¨Ï¥ÎªÌ¹ï«ü©w¬¡­¶Ã¯ªº³]©w¨Ó§ó·s¤º´Oªº OLE ³s½u¡C
  19.    
  20.     Dim WB As Workbook
  21.     For Each WB In Workbooks
  22.         WB.UpdateLinks = xlUpdateLinksAlways
  23.         WB.Close True
  24.     Next
  25. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

·PÁª©¥D¨ó§U

¨C¦¸¬Ý±z¾Þ§@ªº¤è¦¡³£«Ü¨ü±Ð

¤£³æ³æ¥u¬O¥ÎCOPY¦Ó¤w


¸ê®Æ³sµ²ªº³¡¤À

§Ú«á¨Ó¥Î2007ª©´N¨S¦³¦¹°ÝÃD¤F

¤£ª¾¬°¦ó2003ªº·|¸õ¥X¸ß°Ý@@
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 3# li_hsien
§Ú¥u¦³2003ª©,§Aªº°ÝÃD©|»Ý¦³¦¹ª©¥»ªº¬Û§U.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

½Ð°Ýª©¥D

§Ú¬O¥H¤U¤è§@ªk¶}±Ò¦hÀÉ
  1. Private Sub add_data_Click()
  2.     Dim fn As String
  3.     Dim Show_File As Object
  4.     Dim file_count As Integer
  5.     Dim SF_name As String
  6.    
  7.     Application.DisplayAlerts = False
  8.    
  9.     fn = ActiveWorkbook.Name

  10.     Set Show_File = Application.FileDialog(msoFileDialogOpen)
  11.    
  12.     With Show_File
  13.          .InitialFileName = ActiveWorkbook.Path & "\*.xls"  '«ü©w xlsÀÉ
  14.          .AllowMultiSelect = True
  15.          .Show
  16.             If .SelectedItems.Count > 0 Then
  17.             
  18.                 For file_count = 1 To .SelectedItems.Count

  19.                     With Workbooks.Open(.SelectedItems(file_count))
  20.                         
  21.                         Debug.Print "SF(" & file_count & "): " & ActiveWorkbook.Name
  22.                         SF_name = ActiveWorkbook.Name
  23.                         MCD_add fn, SF_name
  24.                         .Close 0
  25.                         
  26.                     End With

  27.                 Next
  28.                
  29.             End If
  30.     End With
½Æ»s¥N½X
½Ð°Ý³o¼Ëªº§@ªk­n¦p¦ó´¡¤JWB.UpdateLinks = xlUpdateLinksNever©O?
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 5# li_hsien
  1. With Workbooks.Open(.SelectedItems(file_count))
½Æ»s¥N½X
³oWorkbook ¶·¬O¨Æ¥ý³]©w.UpdateLinks = xlUpdateLinksNever,
¶}±Ò®É¤~·|¥Í®Ä.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD