Wanting to check this Exit Sub at the top isn't going to cause me other problems. It seems to work, added to rest of my code for reference.
Everything from 'Establish File Extension type has worked to date/to this point. Unsure if just showing the below segment of code is sufficient to answer the question.
If invalid > 0 Then mbResult = MsgBox("Something's missing. Please check and try again. There are " & invalid & " incomplete fields.", _
vbOKOnly)
Select Case mbResult
Case vbOK
Exit Sub
End Select
'Establish File Extension type
With Destwb
If Sourcewb.Name = .Name Then
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End If
End With
FileExtStr = ".xlsm"
FileFormatNum = 52
'Save the new workbook and close it
TempFilePath = ("www.mysharepoint.com") & "\"
TempFileName = Range("A1").Text
'Confirm Submission
mbResult = MsgBox("This submission cannot be undone. Would you like to continue?", _
vbYesNo)
Select Case mbResult
Case vbNo
Exit Sub
End Select
'Build .SaveAs file Name based on variables established previously
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
End With
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
Application.DisplayAlerts = True
ThisWorkbook.Activate
'Display successful submission message
MsgBox ("Thank you, your assessment has been successfully submitted.")
ActiveSheet.Protect
End Sub
You can change these lines:
to this: