Validation data on exit Excel or save
The following workbook events should work
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Validation check code here
'----
'----
'if data not valid then
'Cancel = True
'End If
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
'Validation check code here
'----
'----
'if data not valid then
'Cancel = True
'End If
End Sub
"Atram Informatika" wrote in message
...
How can I validate data when i exit excel aplication or when i save
workbook?
If data not valid then i must display message and do not exit aplication,
or
save document.
Thank's
|