Hello,
Below there is code for some inputboxs as well as some if statements on their results. The Exit sub situations work fine but If i do actually put a valid answer in the secod input box then it results in a mismatch error on the OR statement... Can anyone tell me why the first inputbox works fine but the second one gives me a type mismatch error when a valid input is given? Also if there's a more efficient way to do this please feel free to correct the code.
Thanks
Dim Month As String
Dim Last As String
Dim Added As String
Answer = Application.InputBox(prompt:="Enter the name of the previous Month: I.E. July ", Type:=2)
If Answer = "" Or Answer = False Then Ans = MsgBox("Last Month's Schedule Required", vbOK)
If Ans = vbOK Then Exit Sub
Last = Mid(Answer, 1, 3)
Month = Application.InputBox(prompt:="Enter The Month to Reconcile: Exactly as shown in JDE Download/Explanation Alpha Name", Type:=2)
If Month = "" Or Month = False Then Ans = MsgBox("Current Month's Information Required", vbOK)
If Ans = vbOK Then Exit Sub
Bookmarks