I'm getting the object variable 91 error: Would someone just mind checking my code?
Code: Select all
Dim fso As FileSystemObject
If Me.AcrobatPath.Text = "" Then
MsgBox "Please Select a File to Delete", vbInformation, "Document Delete"
Exit Sub
End If
If MsgBox("This Document Will Be Deleted " & Me.AcrobatPath.Text, _
vbYesNo + vbInformation) = vbYes Then
fso.DeleteFile (Me.AcrobatPath.Text)
MsgBox "Document Deleted", , "Deleted"
Me.File1.Refresh
Else
MsgBox "Document Not Deleted", , "Cancelled"
End If
Set fso = Nothing