Hey everyone!
Quick question!
Here's my code
fName = Application.InputBox("Please enter a name for the backup", "Backup Name", Type:=1)
Dim sPath As String
sPath = ThisWorkbook.Path & "\dsystembackups\"
If Dir(sPath, vbDirectory) = vbNullString Then
MkDir sPath
End If
ThisWorkbook.SaveCopyAs Filename:=sPath & fName & ".xls"
MsgBox ("System Backed Up Successfully")
Everything works good, but theres a couple of things:
1) When the InputBox appears, the user can click "Cancel" and the backup still runs, and names the file 'False.xls' - How do I block this from happening?
2) Maybe related to what I mentioned in 1) but what code do I put so that the user cannot leave the field blank and clikc 'OK'?
Thanks
Bookmarks