Excel problem

  • Thread starter Thread starter Chris Cooper
  • Start date Start date
C

Chris Cooper

I have created a validation list in excel, is there a
rule i can create that wont let me save the sheet unless
this list has been used and data entered in the cell?
 
Hi

Open the VB Editor (Alt F11 or similar). Paste this into the ThisWorkbook
module:

Private Sub Workbook_BeforeSave(ByVal _
SaveAsUI As Boolean, Cancel As Boolean)
If Sheets(1).Range("F2").Value = "" Then
Cancel = True
MsgBox "Sheet1 F2 is empty, you lazy...", _
vbExclamation, "Work !"
End If
End Sub
 
Back
Top