Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to set a field in Excel to be mandatory. I want it to not go to
the next field unless data is entered. O |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Say your mandatory field is Cell A1. Then put the following in the
Worksheet Change event of the sheet Private Sub Worksheet_Change(ByVal Target As Range) If (Intersect(Target.Cells(1), Range("A1")) Is Nothing) Then If Trim(Range("A1").Text) = "" Then MsgBox "Please enter a value in cell A1 before proceeding" Application.EnableEvents = False Target.Cells.Clear Application.EnableEvents = True End If End If End Sub "RSP" wrote: I would like to set a field in Excel to be mandatory. I want it to not go to the next field unless data is entered. O |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I WANT TO CREATE MANDATORY CELLS | Excel Worksheet Functions | |||
mandatory field size within table | Excel Discussion (Misc queries) | |||
mandatory field | Excel Discussion (Misc queries) | |||
How do I create a mandatory field in Excel | Excel Programming | |||
how do you set up a mandatory field in Excel? | Excel Discussion (Misc queries) |