Private Sub Command1_Click()
Dim fs As New FileSystemObject '工程—引用 中添加"Microsoft Scripting Runtime"类库
Dim fn As String
fn = "e:/a/b.txt"
If fs.FileExists(fn) = True Then
fs.DeleteFile fn
Else
MsgBox "要删除的文件不存在!"
End If
End Sub

IT618资讯网 提供服务端开发,前端开发,网页特效,热门开源系统研究,软件下载,站长建站,淘宝开店等学习资料.