![]() |
Have cell require input before saving.
Is there a way to easily have a cell (or cells) require input, or the file cannot be saved? I have a simple formula setup at the moment that simply warns if no entry is detected, however, that doesn't stop end users from simply submitting the form anyway.... -- couriced ------------------------------------------------------------------------ couriced's Profile: http://www.excelforum.com/member.php...o&userid=26900 View this thread: http://www.excelforum.com/showthread...hreadid=477897 |
Have cell require input before saving.
You would need a macro that is triggered by the save command. Such a macro
would check what you want checked, and if the conditions are not met the save command would be cancelled. The macro can also display a message box telling the user the error of his ways and what he must do before he can save the file. The macro would look like this: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Sheets("This").Range("A1")="" Or Sheets("That").Range("C5")="" Then Cancel = True MsgBox "Such and such." End If Post back if this fits with what you want and you need more. This macro must be placed in the workbook module. To do that, right-click on the Excel icon immediately left of the word "File" in the menu across the top of your sheet, select View Code, and paste this macro in that module. Change the sheet name(s) and cell addresses as needed. HTH Otto End Sub "couriced" wrote in message ... Is there a way to easily have a cell (or cells) require input, or the file cannot be saved? I have a simple formula setup at the moment that simply warns if no entry is detected, however, that doesn't stop end users from simply submitting the form anyway.... -- couriced ------------------------------------------------------------------------ couriced's Profile: http://www.excelforum.com/member.php...o&userid=26900 View this thread: http://www.excelforum.com/showthread...hreadid=477897 |
All times are GMT +1. The time now is 08:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com