I am putting this info into Visual Basic Editor under Module - it is not
working I pasted yout code and inserted my information (i.e. sheet names and
cell numbers) but it is not working - do you know what I am doig wrong?
"Bernie Deitrick" wrote:
In the Thisworkbook's codemodule, put this type of code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Worksheets("Sheet1").Range("A1").Value = "" Then Cancel = True
If Worksheets("Sheet2").Range("B2").Value = "" Then Cancel = True
' and so on for each cell that you require to be filled in
End Sub
--
HTH,
Bernie
MS Excel MVP
"Sierra Coating" <Sierra wrote in message
...
I would like to know if there is a way that I can set up a file that will not
allow someone to close it until certain cells are filled in.