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

[µo°Ý] ½Ð°Ý§R°£¸ê®Æ§¨¤ºªº©Ò¦³*.xls

¦^´_ 2# HSIEN6001
  1. Option Explicit
  2. Sub Ex()
  3.     Kill "D:\*.xls"
  4. End Sub
  5. Sub Ex1()
  6.     Dim Fs As Object, xPath As String, xFile As String
  7.     Set Fs = CreateObject("Scripting.FileSystemObject")
  8.     xPath = "D:\"
  9.     xFile = Dir(xPath & "*.xls")
  10.     Do
  11.         If xFile <> "" Then
  12.         Fs.DeleteFile xPath & xFile
  13.         xFile = Dir
  14.         End If
  15.     Loop While xFile <> ""
  16. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# freeffly
¬O¤@¼Ëªº Ex1¥i²¤Æ ¦p Ex
  1. Option Explicit
  2. Sub Ex()
  3.     On Error Resume Next    '¦³¿ù»~®É¤£²z·|¥¦, Ä~Äò¤U¤@¦æµ{¦¡½X
  4.     Kill "D:\*.xls"                      '§ä¤£¨ìÀɮ׮ɷ|¦³¿ù»~
  5. End Sub
  6. Sub Ex1()
  7.     Dim Fs As Object, xFile As String
  8.     On Error Resume Next    '¦³¿ù»~®É¤£²z·|¥¦, Ä~Äò¤U¤@¦æµ{¦¡½X
  9.     Set Fs = CreateObject("Scripting.FileSystemObject")
  10.     xFile = "D:\*.xls"
  11.     Fs.DeleteFile xFile     '§ä¤£¨ìÀɮ׮ɷ|¦³¿ù»~
  12. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ÁÀ¨¥¹³¤@¦·²±¶}ªºÂAªá¡A¥~ªí¬üÄR¡A¥Í©Rµu¼È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD