Documente Academic
Documente Profesional
Documente Cultură
A form, whether printed or online, is a document designed with a standard structure and
format that makes it easier to capture, organize, and edit information.
Printed forms contain instructions, formatting, labels, and blank spaces for
writing or typing data. You can use Excel and Excel templates to create printed
forms.
Online forms contain the same features as printed forms. In addition, online forms
contain controls. Controls are objects that display data or make it easier for users
to enter or edit data, perform an action, or make a selection. In general, controls
make the form easier to use. Examples of common controls include list boxes,
option buttons, and command buttons. Controls can also run assigned macros
and respond to events, such as mouse clicks, by running Visual Basic for
Applications (VBA) code.
You can use Excel in several ways to create printed and online forms.
Data form
Excel can automatically generate a built-in data form for your range or table. The data
form displays all column headers as labels in a single dialog box. Each label has an
A worksheet is a type of form that enables you to enter and view data on the grid, and
there are several control-like features already built-in to Excel worksheets, such as
comments and data validation. Cells resemble text boxes in that you can enter and
format them in a variety of ways. Cells are often used as labels, and by adjusting cell
height and width and merging cells, you can make a worksheet behave like a simple data
entry form. Other control-like features, such as cell comments, hyperlinks, background
images, data validation, conditional formatting, embedded charts, and AutoFilter can
make a worksheet behave like an advanced form.
For added flexibility, you can add controls and other drawing objects to the drawing
canvas of a worksheet, and combine and coordinate them with worksheet cells. For
example, you can use a list box control to make it easier for a user to select from a list of
items. Or, you can use a spin button control to make it easier for a user to enter a
number.
Because controls and objects are stored on the drawing canvas, you can display or view
controls and objects alongside associated text that is independent of row and column
boundaries without changing the layout of a grid or table of data on your worksheet.
Most of the time, many of these controls can also be linked to cells on the worksheet and
do not require VBA code to make them work. You can set properties that determine
whether a control floats freely or moves and resizes together with a cell. For example,
you might have a check box that you want to move together with its underlying cell
when the range is sorted. However, if you have a list box that you want to keep in a
specific location at all times, you probably do not want it to move together with its
underlying cell.
Excel has two types of controls: Form controls and ActiveX Controls. In addition to these
sets of controls, you can also add objects from the Drawing tools, such as a AutoShapes,
WordArt, SmartArt graphic, or text boxes.
The following sections describe these controls and drawing objects, and also explain how
to work with these controls and objects in more detail.
You use Form controls when you want to easily reference and interact with cell data
without using VBA code, and when you want to add controls to chart sheets. For
example, after you add a list box control to a worksheet and linking it to a cell, you can
return a numeric value for the current position of the selected item in the control. You
can then use that numeric value in conjunction with the INDEX function to select
different items from the list.
You can also run macros by using Form controls. You can attach an existing macro to a
control, or write or record a new macro. When a user of the form clicks the control, the
control runs the macro. However, these controls cannot be added to UserForms, used to
control events, or modified to run Web scripts on Web pages.