Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Mandatory Cells
I want to make a specific cell on a spread sheet I've created mandatory
before the document can be saved. For example; L2 must have a data entry before document can be saved. Is this possible, if so, how do I do it. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Mandatory Cells
Doorguy
You could put some workbook_beforesave() event code in the ThisWorkbook module, like so Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Worksheets("Sheet1").Range("L2").Value = "" Then MsgBox "Sheet1 Cell L2 must have an entry, save aborted", vbOKOnly + vbInformation, "Error" Cancel = True End If End Sub To implement right click the Excel icon near the top left of the window and select view code, paste the code here, change the sheet name as necessary and save the file -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "doorguy" wrote in message ... I want to make a specific cell on a spread sheet I've created mandatory before the document can be saved. For example; L2 must have a data entry before document can be saved. Is this possible, if so, how do I do it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking Groups of cells between workbooks | Excel Discussion (Misc queries) | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
Check/Tick box's and Mandatory cells | Excel Discussion (Misc queries) | |||
Help adding text values | Excel Worksheet Functions | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions |