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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top