Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created February 27, 2018 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DuongAQ/aac26c5a3926f8391eaa54e64598dceb to your computer and use it in GitHub Desktop.
Save DuongAQ/aac26c5a3926f8391eaa54e64598dceb to your computer and use it in GitHub Desktop.
Sub Remove_File() 'Xóa file trong folder bằng VBA
'Tạo thông báo xác nhận xóa
Dim Msg as String
Msg=MsgBox("Delete Folder", vbYesNo)
'Thực hiện việc xóa
If Msg=vbYes Then Kill "C:\Users\HYMC\Downloads\Test\*.*"
'C:\Users\HYMC\Downloads\Test\ là đường dẫn tới thư mục cần xóa
'*.* là tất cả các file cần xóa (có bao gồm dấu chấm đuôi file)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment