- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
DEAR ALL ¤j¤j
1.©ó C:AAA\¤U©ñ¸m EXCELÀÉ A1.XLS A2.XLS A3.XLS............
2.EXCEL ¬° 2010ª© ...
rouber590324 µoªí©ó 2022-8-23 10:00
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, a, fs, fc, f, f1, n&
Application.ScreenUpdating = False: Application.DisplayAlerts = False: Application.AskToUpdateLinks = False
Set fs = CreateObject("Scripting.FileSystemObject")
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "D:\"
.Title = "¿ï¾ÜÀɮרӷ½¸ê®Æ§¨"
.Show
On Error GoTo EndSub:
a = .SelectedItems(1)
End With
Tm = Timer
Set f = fs.GetFolder(a)
Set fc = f.Files
For Each f1 In fc
Set WB = Workbooks.Open(f1)
With Sheets(1)
If .FilterMode Then .ShowAllData
Arr = .Range("a1").CurrentRegion
End With
WB.Close
If [a1] = "" Then n = 1 Else n = [A65536].End(xlUp).Row + 1
Range("a" & n).Resize(UBound(Arr), UBound(Arr, 2)) = Arr
Next
Application.ScreenUpdating = True: Application.DisplayAlerts = True: Application.AskToUpdateLinks = True
MsgBox "°õ¦æ§¹¦¨" & Timer - Tm & " ¬í"
EndSub:
End Sub |
|