Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cellcontents = Sheets(1).Range("B13,G9,G13,B18,B20,B27,B30,B32,F27,B37,B39,F38").Value
If Cellcontents = "" Then
Cancel = False
MsgBox "Input required in mandatory cells! Saisie requise dans les cellules obligatoires!", vbOKOnly, "Attention!"
Exit Sub
End If
Cellcontents = Sheets(2).Range("B13,G9,G13,B20,B22,F30,B33,F33,B35,E35,H35,B43,B45,F44").Value
If Cellcontents = "" Then
Cancel = False
MsgBox "Input required in mandatory cells! Saisie requise dans les cellules obligatoires!", vbOKOnly, "Attention!"
Exit Sub
End If
Cellcontents = Sheets(3).Range("B13,G9,G13,B20,B22,B29,B31,B34,F31,G29,F34,B43,B45,F44").Value
If Cellcontents = "" Then
Cancel = False
MsgBox "Input required in mandatory cells! Saisie requise dans les cellules obligatoires!", vbOKOnly, "Attention!"
Exit Sub
End If
Cellcontents = Sheets(4).Range("B13,G9,G13,B17,B21,B23,B26,B28,F21,F23,F24,E26,F28,D31,B33,E33,B35,B37,B39,F39,B42,G42,B45,F45,B47,G47,B50,G49,G51,B53,G53,B55,G55,B57,G57,B59,G59,B62,G62,B64,B66,G66,B84,B86,F85").Value
If Cellcontents = "" Then
Cancel = False
MsgBox "Input required in mandatory cells! Saisie requise dans les cellules obligatoires! ", vbOKOnly, "Attention!"
Exit Sub
End If
End Sub
Bookmarks