MrExcel Publishing
Your One Stop for Excel Tips & Solutions

required field entry


Posted by Becky on January 04, 2002 1:41 PM

I am trying to make a form for our vendors that has questions that require an answer, making it so that they cannot move on to the next question unless there is an answer typed into the cell. Does anyone know how to do that??


Posted by Tom Dickinson on January 04, 2002 10:15 PM

In the form, do a check when you exit. The routine starts something like this:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

but it is easier to have the program write it by selecting the "Exit" action for the box. Within the routine, put:

If TextBox1 = Empty then
Cancel = TRUE
else
Cancel = FALSE
End if

Hope that helps.


The easiest method is to highlight the object, and on the programming sheet, : I am trying to make a form for our vendors that has questions that require an answer, making it so that they cannot move on to the next question unless there is an answer typed into the cell. Does anyone know how to do that??