I'm getting into a bit of a pickle with the IF statements and was hoping that someone could check the code below.
At one point I had it so that if the user selected either No or Cancel on the twp message boxes then the the message "Halted By User" would appear. Since adding the additional IF statement for checking the file extension then it does not work.
I'd appreciate it if someone could tell me what I've done wrong.
Dim MyPrompt1
Dim MyInput1 As String
Sheets("Sheet1").Activate
MyPrompt1 = MsgBox("The current workbook is " & Range("B4") & vbCrLf & "Would you like to change it?", vbYesNo)
If MyPrompt1 = vbYes Then
MyInput1 = UCase(InputBox("Enter new workbook date"))
Range("C3") = MyInput1
If MyInput1 = Range("B4") Then
MsgBox "Samefile name unable to proceed"
Exit Sub
End If
If Range("D3").Value <> ".XLS" Then
MsgBox "Missing or Incorrect File Extension"
Exit Sub
Else
MsgBox "OK to continue"
End If
MsgBox "Halted By User!"
End If