View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Stop user from saving workbook unless cell is filled in

Hi,

Alt +F11 to open VB editor, double click 'This Workbook' and paste this in
on the right. Change the cell to the one you want and tidy up the message

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not IsDate(Sheets("Sheet1").Range("A1").Value) Then
MsgBox "You must fill in cell xxxxxx"
Cancel = True
End If
End Sub

Mike

"Churley" wrote:

I created an account form in Excel that is filled in by others when they want
a new account to be set up.
There is one cell in particular that they have to fill in, but very often do
not. I was hoping there was something in Excel that would stop them from
saving the spreadsheet unless this cell is filled in.
Any help would be appreciated.

Thanks so much.