Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim cell1 As Range
Dim cell2 As Range
For Each cell1 In Sheets("FABRICATION WORK ORDER").Range("C1:C6,C9:C16,E28")
If cell1.Value = "" Then
Cancel = True
MsgBox "Cell " & cell1.Address & " is empty - Please fill the cell before saving!", vbOKOnly, "Check Cells"
Exit Sub
End If
Next cell1
For Each cell2 In Sheets("INSTALLATION WORK ORDER").Range("D9:D15,D19:D22,I12:I19")
If cell2.Value = "" Then
Cancel = True
MsgBox "Cell " & cell2.Address & " is empty - Please fill the cell before saving!", vbOKOnly, "Check Cells"
Exit Sub
End If
Next cell2
End Sub
Private Sub Workbook_Open()
End Sub
Bookmarks