- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# borshun88
DateLastModified ÄÝ©Ê ¶Ç¦^³Ì«á¤@¦¸×§ï«ü©wÀɮשθê®Æ§¨ªº¤é´Á©M®É¶¡¡C°ßŪ¡C
À°§A§ä¨ì³Ì·s¦³×§ïªºÀÉ®×,³Ñ¤Uªº½Ð¦Û¤v§¹¦¨- Option Explicit
- Sub ¥¨¶°1()
- Dim f As Object, FileDate(), FileName(), S As Variant
- If Dir("D:\AA\*.xlsm") = "" Then: MsgBox "¨SÀÉ®×": Exit Sub
- For Each f In CreateObject("scripting.filesystemobject").GetFolder("d:\AA").Files
- If InStr(f, ".xlsm") Then
- ReDim Preserve FileName(S)
- ReDim Preserve FileDate(S)
- FileName(S) = f
- FileDate(S) = CDbl(f.DateLastModified)
- S = S + 1
- End If
- Next
- If S > 0 Then
- S = Application.Match(Application.Max(FileDate), FileDate, 0) - 1
- MsgBox FileName(S)
- End If
- 'fs.DeleteFile "D:\AA\*"
- 'MsgBox "Done"
- End Sub
½Æ»s¥N½X |
|