I've got a Do-While loop in VBA asking the user for their company UserID. This is used to find a folder in their personal folder, doesn't really matter that much.
I'm using an Input Box as I don't know how else I would do this:
Do
filepath2 = Application.InputBox("Enter your User FDIC", "UFDIC")
If filepath2 = False Then Exit Sub
filepath3 = "C:\Users\" & filepath2 & "\Desktop\NSC\"
Dir (filepath3)
Loop While Not Dir(filepath3) > ""
So basically, this will ask the user for UserID, if the user selects the button "Cancel", it will exit the sub. If not, it will take the UserID and make sure it exists. I'm getting a Type Mismatch error when it comes to the line
If filepath2 = False Then Exit Sub
due to it expecting a Boolean value, I think.
Should I be using something other than an Input Box?
If not, how do I type check?