View Single Post
 
Old 04-24-2013, 11:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can do that with code in the workbook's ThisWorkbook module, like:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Sheets("Sheet1")
  If .Range("B9").Value = "" Then Cancel = True
  If .Range("B20").Value = "" Then Cancel = True
  If .Range("G13").Value = "" Then Cancel = True
End With
If Cancel = True Then MsgBox "Please complete all required cells"
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote