Remove Directory using API
Return to List
Private Declare Function RemoveDirectory Lib "kernel32.dll" Alias _
"RemoveDirectoryA" (ByVal lpPathName As String) As Long
Private Sub Form_Load()
retval = RemoveDirectory("C:\Temp")
If retval = 1 Then
MsgBox "C:\Temp was successfully deleted."
MsgBox "Deletion failed."
Note to Webmaster