½Ð°Ý Application.FileSearch '°õ¦æ¶¥¬q¿ù»~2455 ,½Ð°Ý³oÀ³¸Ó«ç»òקï?
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
½Ð°Ý Application.FileSearch '°õ¦æ¶¥¬q¿ù»~2455 ,½Ð°Ý³oÀ³¸Ó«ç»òקï?
- Function ¸ê°T()
- DoCmd.SetWarnings False
- Dim Filename As Integer
- Set BK = Application.FileSearch '°õ¦æ¶¥¬q¿ù»~2455 ,½Ð°Ý³o¸Ó«ç»ò§ï?
- With BK
- .LookIn = "D:\¸ê°T-ì©l\"
- .Filename = "all*.xls"
- If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
- For B = 1 To .FoundFiles.Count
- DoCmd.TransferSpreadsheet acImport, 8, "00 ì©l¸ê®Æ", .FoundFiles(B), True
- Next
- End If
- End With
- Set BK = Nothing
- End Function
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 16
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 55
- ÂI¦W
- 0
- §@·~¨t²Î
- macOS / Windows
- ³nÅ骩¥»
- Office 2010/2019
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2020-7-9
- ³Ì«áµn¿ý
- 2021-8-7
|
½Ð°Ý office ª©¥»?, ¥i¥H´« FileSystemObject ¨Ó¥Î- Dim FSO As Object
- Dim localfolder As String
- Set FSO = CreateObject("Scripting.FileSystemObject")
- localfolder = "D:\¸ê°T-ì©l\"
- Set fld = FSO.GetFolder(localfolder)
- For Each myFileName In fld.Files
-
- If FSO.GetExtensionName(localfolder & myFileName.Name) = "xls" Then
- Debug.Print myFileName.Name
- End If
- Next
½Æ»s¥N½X |
|
|
|
|
|
|