Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
In Excel, how to make a field required so it's not left blank?
I've seen a lot of advise, however I need complete, step-by-step
instructions. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
In Excel, how to make a field required so it's not left blank?
I assume you want to ensure that a cell is filled out before the
workbook is closed. Open the VBA Editor, display the Project Window (CTRL+R) and open the ThisWorkbook code module. There, paste the following code: Private Sub Workbook_BeforeClose(Cancel As Boolean) If Worksheets("Sheet1").Range("A1").Value = "" Then MsgBox "You must fill in A1." Cancel = True End If End Sub Change the Sheet name and cell reference to meet your needs. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "linplex" wrote in message ... I've seen a lot of advise, however I need complete, step-by-step instructions. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can I make a field in excel spreadsheet required? If yes, How? | Excel Discussion (Misc queries) | |||
How do I make a particular column required in Excel? | Charts and Charting in Excel | |||
Required field message - Excel | Excel Discussion (Misc queries) | |||
Removing blank characters from left of field | Excel Programming | |||
How do I make a value required in a cell in Excel? ex: Name, Last. | Excel Programming |