View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Alerting Users that Required Fields have not been Completed

hi XLUser

You can use the beforeclose event in the Thisworkbook module

Try this tester for the cells A1,A3 and C1

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim response
If Application.WorksheetFunction.CountA(Sheets("Sheet 1").Range("A1,A3,C1")) < 3 Then
response = MsgBox("Are you sure you want to close, not all cells are filled", vbYesNo)
If response = vbYes Then
'do nothing
Else
Cancel = True
End If
Else
'do nothing
End If
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"XLUser" wrote in message ...
I would like to setup a function similar to a web-based function which
informs users that all required information has not been completed and to
please complete all required fields. I would like to be able to allow them
to close the spreadsheet even if required fields are not completed.

Does anyone know how to setup such a functionality in Excel?
--
XLUser