Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not DataValidated Then Cancel = True
End Sub
'Code for worksheet(Blah Blah), might as well check when the User leaves the sheet.
Private Sub Worksheet_Deactivate()
Dim X
X = DataValidated
End Sub
'In Standard Module
Private Function DataValidated() As Boolean
With Sheets("Blah Blah")
'Most likely scenario
If .Range("B1") <> 100 Then
DataValidated = True
Exit Function
End If
'B1 is 100
If .Range("G5") <> ??? Then 'Adjust to suit
MsgBox " You must have a value in cell G5"
.Range("G5").ClearContents
.Range("G5").Activate
Else
DataValidated = True
End If
End With
End Function