Forcing Cell Completion

  • Thread starter Thread starter SamuelT
  • Start date Start date
S

SamuelT

Hi all,

I've got a spreadsheet that is being filled in by various people. The
data therein is then used by myself to create another report. Problem
is, a lot of the people do not fill all the necessary cells making my
job somewhat difficult.

Is there a means of forcing the people filling in the report to
complete all the cells? e.g. they can't save the document until all the
cells are filled, or even just a warning that all the necessary fills
aren't filled in.

Any help would be appreciated.

TIA,

SamuelT
 
you can check the required fields are filled in in the Workbook_BeforeClose
event and/or the Workbook_BeforeSave event.
 
Bob,

Thanks for that. I don't know much about those worksheet
functions...I've done a bit of research and it seems those events
simply add stuff when you close/save the document. Am I right? My VB
isn't that hot, so would appreiciate some assistance.

TIA,

SamuelT
 
The following code prevents the user from saving the workbook if they
have not filled something in range A1 of sheet1.
It will pops up a massege box.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Len(ThisWorkbook.Sheets("Sheet1").Range("A1").Value) = 0 Then
MsgBox "If you don't fill cell A1 you can not save"
Cancel = True
End If
End Sub
 
Back
Top