Having required fields in fill-in form

S

shepherdess

Is it possible to have required fill-in cells in a preformatted form? Say,
the completer cannot leave the field or save the file unless the required
fields are completed?

Thanks in advance for any help you can give me on this one.
 
J

JLatham

Explain a little more by what you mean by "form" -- are you talking about a
UserForm that has entry fields in it, or are you writing about a worksheet
that is laid out and used as a 'form" for users to put information into
certain required cell locations on it?

In both cases, the answer is YES, you can validate entries before
continuing. How you do it depends on what you are using as a form. If it is
a worksheet being used as a form, then you can do this with the workbook's
_BeforePrint() and _BeforeSave() event handlers. For a UserForm, you'd have
to put the code into the UserForm's code area and exactly where to put it
depends on the form's setup.
 
S

shepherdess

I am asking about the first of your options---a standardized form for our
sales reps set up so that they cannot leave required fields blank. They enter
data into these fields---data that will be used by a programmer to prepare a
formatted quote for our product---prepared in other software.

Thank you so much for the information and your reply.

Shepherdess
 
J

JLatham

In a UserForm in Excel there is typically some point at which the information
must be transferred from the form onto a worksheet somewhere. During that
data transfer process is where you'd test to make sure that all of the data
entry fields are populated - you can even test to see that they are at least
of valid types of entries (numbers or text) and possibly even valid entries
if the possible entries can be accurately defined - as you might define all
possible names in a list, or set limits for a range of values (as from 1
through 100).

In Excel, a UserForm is an object that is created, maintained and coded from
within the Visual Basic Editor. A worksheet used as a data entry form is
just a regular worksheet, complete with name tab and cells - it's just been
formatted to look like a nice, neat form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top