Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Sheets("Details").Range("a1") <> "Red" Then
MsgBox "Cell A1 does not equal Red, so the workbook has not been saved"
Cancel = True
End If
End Sub