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

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

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

½Ð°Ý§R°£«ü©w¸ê®Æ§¨¤ºªº©Ò¦³*.xls ¤§VBA»yªk

ÃD·N¤£©ú?! §Ú§ä¨ì¤@­Ó
DeleteFile(mPath+mFile);      //§R°£ExcelÀÉ

DeleteFile("c:/test/123456.txt") ¡F
¦ý°õ¦æ¥X²{¨S¦³©w¸qDeleteFile ªºSub ©Î Function
¦n¹³¬OC++»yªk

VBA¥i¥H°µ?!

TOP

¦^´_ 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

¦^´_ 3# GBKEE


¨â­Ó³£¥i¥H¥Î!¤Ó·PÁ¤F~^o^~y
¥i¥H¨Ó£¢¦Y¶º°Õ!

¤£·|»yªk¯»µh­W~´XªñÅܺA¤¤~^^!!

¦A¦¸·PÁÂ!!
TKS!

TOP

¦^´_ 3# GBKEE


    ªO¥D·Q°Ý¤@¤U
   ²Ä¤@­Ó¤ñ¸û²³æ®e©ö²z¸Ñ
   ²Ä¤G­Ó¸ò²Ä¤@­Óªº§@¥Î¦³­þ¸Ì¤£¤@¼Ë¶Ü
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

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

¦^´_ 6# GBKEE


    ÁÂÁªO¥D¸Ñ»¡
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD