ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   is it possible to make a cell in excel as entry required (https://www.excelbanter.com/excel-discussion-misc-queries/117880-possible-make-cell-excel-entry-required.html)

max power

is it possible to make a cell in excel as entry required
 
i need an excel sheet to prompt for entry so that it cannot be left blank
before saving or sending.

i thought it would be done through data vaalidation but i cannot work it out

Jim Rech

is it possible to make a cell in excel as entry required
 
There is no connection between Data Validation and saving a workbook. You'
have to use the workbook's BeforeSave event. This goes in the ThosWorkbook
module:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Sheet1.Range("A1").Value = "" Then
Cancel = True
MsgBox "Please complete cell A1"
End If
End Sub


--
Jim
"max power" wrote in message
...
|i need an excel sheet to prompt for entry so that it cannot be left blank
| before saving or sending.
|
| i thought it would be done through data vaalidation but i cannot work it
out




All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com