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

[µo°Ý] ¦³¤j¤j¯àÀ°¦£¶ÜApplication.FileSearch

[µo°Ý] ¦³¤j¤j¯àÀ°¦£¶ÜApplication.FileSearch

¦U¦ì¤j¤j­Ì¦n¡A¦]¬°excel§ó·s«áµ{¦¡µLªk¥Î¤F¡A
¤U¦Cµ{¦¡¦³°ÝÃD¡A¦ý¤p§Ì¤S¤£·|§ï¡A§Æ±æ¦³°ª¤â
¯àÀ°¦£¡I

    Set FS = Application.FileSearch
   
    With FS
   
         .LookIn = FilePath
         .FileName = FileSpec
         .FileType = msoFileTypeExcelWorkbooks
         .Execute
         
         If .FoundFiles.Count = 0 Then
             MsgBox "No files were found !"
             Exit Sub
         End If
   
     End With

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD