| 'This program
deletes a folder
Dim strDir As String
Private Sub Command1_Click()
On Error GoTo ErrHandler:
strDir = InputBox("Enter the
directory you wish to remove",
"Directory")
RmDir (strDir)
MsgBox "Directory " &
strDirectory & " has been
removed", vbSystemModal + vbOKOnly,
"Directory Removed"
ErrHandler:
MsgBox "This directory does not
exist, please re-enter a valid path",
vbExclamation + vbOKOnly, "Invalid
Directory"
End Sub
|