hello,
I have an Excel 2003 file where I would like to forbid people to save it unless some particular cell have "0" (zero) as a value.
with a msgBox that would say that those cells need to be at zero in order for them to be able to save the file.
Looking around i found the Workbook_BeforeSave but do not really know how to use it : i have come so far to a code that look like this :
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Worksheets("Sheet1").Cells(D1,e1,f1,g1,h1,i1).Value <> 0 Then
Cancel = True
MsgBox "Your Modification Impacted the Utiliti, Please Register Your Impact in Order to be Able to Save your Contribution to the File!", vbOKOnly
Else
Cancel = False
End If
End Sub
thanks everyone for your help
Bookmarks