View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben[_2_] Gord Dibben[_2_] is offline
external usenet poster
 
Posts: 621
Default Manditory cells in table

You will need code to prevent saving if cells are not filled.

Adapt to suit.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Dim cell As Range
For Each cell In Sheets("Sheet1").Range("A2,A3")
If IsEmpty(cell.Value) Then
MsgBox "You must fill in cell " & cell.Address
Application.Goto cell
Cancel = True
Exit For
End If
Next cell
End Sub


Gord


On Fri, 5 Dec 2014 13:38:27 +0000, Jeff Owen
wrote:


Hello All

Hopefully someone here can help and I am posting this in the right part
of the forum.
I am looking to create a list of my employees name / department / start
date / managers name. the issue is staff are leaving certain peices of
information blank causing me to spend a lot of time searching through
files to find the missing info. (I have tried explaining this to them
but am at the head banging against a wall stage and need to make this
idiot proof)
Is there a way that you could input one persons information on the list
and if all the information isnt there it wont save? But also be able to
add names further down the line as and when needed?

Thanks people!

Jeff