在 Microsoft Excel 中,Form Controls用于在对话框工作表的列表中选择项目。表单控件(Form Controls)使用户更容易与他们创建的单元格数据进行交互。几个控制表单(Control Forms)将添加到您的工作表中;这些是标签(Label)、组(Group)框、复选框按钮(Checkbox Button)、选项按钮(Option Button)、列表框(List Box)、组合框(Combo Box)、滚动条(Scroll Bar)和旋转按钮(Spin Button)。
表单控件的类型
- 标签(Label):标签(Labels)显示描述性文本,如图片、标题和标题,它还标识单元格的目标。
- 分组框(Group box):密切相关的内容用可选标签分组。
- 按钮(Button):此控件(Control)运行宏并在用户单击它时执行操作。
- 复选框(Check Box):这使用户可以选择打开和关闭一个暗示相反选择的值。您可以选择多个复选框(Check Box)。
- 选项按钮:(Options Button: )与复选框(Check Box)一样,它还为您提供了打开和关闭表示相反选择的值的选项。唯一的区别是Option Button只允许用户选择一个选项,这与Check Box不同。
- 列表框:(List Box:)显示用户可以从中选择的文本项列表。
- 组合框(Combo Box):这是一个带有列表框的文本框,用于创建下拉列表框。组合框允许用户单击下拉箭头以显示列表。
- 滚动条:使用(Scroll Bar: )滚动(Scroll)条箭头键滚动一系列值,或者拖动或拖动滚动框。
- 旋转按钮:(Spin Button: )这会增加或减少数值、日期或时间等值。要增加值,请单击向上箭头;要减小值,请单击向下箭头。
在 Excel 中创建和使用表单控件
在本文中,我们将讨论这些主题:
- 如何找到表单控件
- 如何创建标签
- 如何创建按钮
- 如何创建复选框
- 如何创建选项按钮
- 如何创建列表框
- 如何创建组合框
- 如何创建滚动条
- 如何创建旋转按钮
- 如何创建组框
1]如何找到表单控件
右键单击标准工具栏(Standard Tool Bar) 并选择自定义功能区(Customized the Ribbon)。将弹出一个名为Excel Option的对话框。在对话框的左侧,单击Developer旁边的复选框(Check Box),然后单击确定。(OK. )在菜单栏上,(Menu Bar, )您将看到开发人员(Developer )选项卡。
2]如何创建标签
在开发人员窗口(Developer Window)中,单击插入工具(Insert Tool),您将看到一个控件表单(Control Forms)列表。单击标签(Label)。你会看到一个十字形的光标出现;使用它来绘制Label,然后右键单击并选择Edit Text以在(Edit Text)Label中输入您的文本。
3]如何创建一个按钮
转到控制组(Controls Group)中的插入工具(Insert Tool)。选择按钮工具(Button Tool)。您将看到一个十字形光标;拖动它来创建按钮。将出现一个分配宏(Assign Macro)对话框。单击(Click)确定(OK)。您将在 Excel 工作表中看到一个按钮。(button)
4]如何创建一个复选框
转到插入工具(Insert Tool)并选择复选框工具(Check Box Tool)。将出现一个十字形光标,绘制您的复选框(Check Box)。现在你有一个Check Box。要重命名,请右键单击复选框(Check Box)并选择编辑文本(Edit text)。
5]如何创建一个选项按钮
在插入工具箱(Insert Toolbox)中,选择选项按钮(Option Button)。会有一个十字形光标;使用十字形光标,然后绘制您的Option Button。要在选项按钮(Option Button)中输入文本,请右键单击或双击按钮并输入您的文本或右键单击并选择编辑文本(Edit Text)。
6]如何创建一个列表框
转到插入工具(Insert Tool),选择列表框(List Box);工作簿中会出现一个十字形光标,并使用十字形光标绘制列表框(List Box)。要将数据输入到框中,右键单击框,然后选择Format Control,将出现一个Format Control 对话框(Dialog Box),单击Control,单击Input Range条目,然后遍历您想要在列表中的单元格,单击它并将其向下拖动。选择的输入范围(Input Range )在对话框的输入范围中,现在单击单元格链接(Cell Link)条目并选择要插入单元格链接(Cell Link)的单元格。
单元链接(Cell Link)将显示您在列表框中(List Box)单击的任何数据;该行将针对每个选定的值出现。然后确定(OK)。如果您希望列表框(List Box)显示您在框中选择的每个数字的行,请单击您选择的单元格范围,单击列表中的任何数据并显示数据所在的行。如果您只想显示列表数据,使用这个公式=INDEX (B2:B7, J2, 0)。B2:B7是您选择的单元格范围,J2是您之前显示的行。当您按下回车键时,当您单击列表中的任何数字时,您将看到列表中的原始数字。
7]如何创建一个组合框
单击插入工具(Insert Tool),选择组合框(Combo Box)。使用十字形光标绘制Combo Box,右键单击Combo Box,选择Form Controls,单击进入Input Range,然后越过您希望列表所在的单元格并将其向下拖动,单击进入单元格链接(Cell Link)并选择要放置单元格链接的单元格。(Cell Link)在本文中,我们将它放在绘制的Combo Box上。(Combo Box)然后确定(OK)。现在,您的工作簿中有一个功能组合框(Combo Box)。
8]如何创建滚动条
单击Insert,选择Scroll Bar,在工作表中绘制Scroll Bar,然后右键单击,选择Form Controls,然后选择OK(O)。然后右键单击Scroll Bar,然后选择 Form Control。将弹出一个表单控件(Form Control)对话框。单击控件(Controls)进行更改;选择要在其中进行控制的(Controls)单元链接(Cell Link)。在本文中,我们选择单元格$E$2。好的。将创建一个滚动条。(Scroll Bar)当您单击Scroll Bar的左箭头时,数字(Decreases)单击滚动条的右箭头时(Scroll Bar)减少,数字增加(Increases)。
9]如何创建一个旋转按钮
单击插入(Insert),选择旋转按钮(Spin Button)。使用工作表中出现的十字形光标来绘制旋转按钮(Spin button)。然后右键选择Form Controls;在“表单控件( Form Control)”对话框中选择“控件(Control)”选项卡,根据需要进行任何更改,通过单击“单元格链接”(Cell Link )条目选择单元格链接(Cell Link),然后单击将出现在“单元格链接”(Cell Link)条目框中的单元格,然后单击“确定(OK)” 。现在我们有一个旋转按钮(Spin Button)。单击向上箭头按钮;数量增加(Increases);单击向下箭头按钮 箭头减小(Decreases).
10]如何创建组框
单击插入(Insert),选择组框(Group box),使用十字形光标绘制组框(Group Box)。要将数据输入到Group Box中,请右键单击,选择Edit Text ,或在(Edit Text)Group Box外双击。
我相信这会有所帮助。
现在阅读(Now read):如何在 Microsoft Excel 中添加或更改工作簿主题(How to add or change the Theme for Workbook in Microsoft Excel)。
How to create and use Form Controls in Excel
In Miсrosoft Excel, Form Controls, it is useful for selecting items in a list of a dialog sheet. Form Controls makes it easier for the users to interact with the cell data that they have created. Several Control Forms will add to your worksheet; these are Label, Group box, Checkbox Button, Option Button, List Box, Combo Box, Scroll Bar, and Spin Button.
The Types of Form Controls
- Label: Labels shows descriptive text such as pictures, titles, and caption, it also identifies the objective of a cell.
- Group box: Closely related contents are grouped with an optional label.
- Button: this Control runs a macro and performs an action when a user clicks on it.
- Check Box: this gives the user the option to turn on and off a value that implies the opposite choice. You can select more than one Check Box.
- Options Button: Like the Check Box, it also gives you the option to turn on and off a value that indicates an opposite choice. The only difference is that the Option Button only allows the user to select only one choice, unlike the Check Box.
- List Box: Displays a list of text items that the user can choose from.
- Combo Box: This is a text box with a list box to create a drop-down list box. The combo box allows the user to click a drop-down arrow to display the list.
- Scroll Bar: Scroll through a range of values using the scroll bar arrow keys or drag or drag the scroll box.
- Spin Button: This increases or decreases values such as numbers, dates, or time. To increase the value, click the up arrow; to decrease the value click the down arrow.
Create & use Form Controls in Excel
In this article, we are going to discuss these topics:
- How to Find the Form Controls
- How to Create a Label
- How to create a Button
- How to create a Check Box
- How to create an Option button
- How to create a List Box
- How to create a Combo Box
- How to create a Scroll Bar
- How to create a Spin Button
- How to create a Group Box
1] How to Find the Form Controls
Right-Click on the Standard Tool Bar and select Customized the Ribbon. A dialog box will pop up called Excel Option. On the left of the dialog box, click the Check Box beside Developer, then OK. On the Menu Bar, you will see the Developer tab.
2] How to Create a Label
On the Developer Window, click the Insert Tool, you will see a list of the Control Forms. Click Label. You will see a cross-shaped cursor appear; use it to draw the Label, then right-click and select Edit Text to enter your text in the Label.
3] How to Create a Button
Go to the Insert Tool in the Controls Group. Select the Button Tool. You will see a cross shape cursor; drag it across to create the button. An Assign Macro dialog box will appear. Click OK. You will see a button in the excel sheet.
4] How to Create a check box
Go to the Insert Tool and select the Check Box Tool. A cross shape cursor will appear draw your Check Box. Now you have a Check Box. To rename, right-click the Check Box and select Edit text.
5] How to create an Option button
In the Insert Toolbox, select the Option Button. There will be a cross shape cursor; take the cross-shape cursor, and draw your Option Button. To enter text into the Option Button, right-click or double-tap in the button and enter your text or right-click and select Edit Text.
6] How to create a List Box
Go to the Insert Tool, select List Box; a cross-shaped cursor will appear in the workbook, and use the cross-shape cursor to draw the List Box. To enter data into the box, right-click the box, and select Format Control, a Format Control Dialog Box will appear, click on Control, click into the Input Range entry, then go over the cell that you want to be in the list, click on it and drag it down. The input range selected is in the Input Range in the dialog box, now click into the Cell Link entry and choose a cell where you want the Cell Link to be inserted.
The Cell Link will display whatever data you click in the List Box; the row will appear for every value selected. Then OK. If you want the List Box to show the rows for every number you selected within the box, click the range of cells you selected, click any of the data in the list and display which row the data is in. If you want to show only the list data, use this formula =INDEX (B2:B7, J2, 0). B2:B7 is the range of cell you selected, J2 is the row that you have displayed before. When you press enter, you will see the original number from the list when you click on any number within the list.
7] How to create a combo Box
Click the Insert Tool, select Combo Box. Use the cross shape cursor to draw the Combo Box, right-click the Combo Box, select Form Controls, click into the Input Range, then go over the cell that you want the list to be in and drag it down, click into the Cell Link and choose a cell where you want the Cell Link to be placed. In this article, we put it over the Combo Box that was drawn. Then OK. Now you have a functional Combo Box in your workbook.
8] How to create a scroll Bar
Click Insert, select Scroll Bar, draw the Scroll Bar in the worksheet, then right-click, select Form Controls, and then select OK. Then right-click the Scroll Bar, then select Form Control. A Form Control dialog box will pop up. Click Controls to make your changes; select a Cell Link where you want the Controls to be taken. In this article, we choose the cell $E$2. OK. A Scroll Bar will be created. When you click on the Scroll Bar‘s left arrow, the number Decreases when you click on the right arrow of the Scroll Bar, the number Increases.
9] How to create a Spin Button
Click Insert, select the Spin Button. Use the cross shape cursor that appears in the worksheet to draw the Spin button. Then right-click select Form Controls; select the Control tab in the Form Control dialog box, make any changes if you want, select a Cell Link by clicking into the Cell Link entry, then click a cell it will appear into the Cell Link entry box then OK. Now we have a Spin Button. Click the up-arrow button; the number Increases; click the down arrow button the arrow Decreases.
10] How to create a group box
Click Insert, choose Group box, use the cross shape cursor to draw the Group Box. To enter data into the Group Box, right-click, select Edit Text, or double-tap right outside the Group Box.
I trust this helps.
Now read: How to add or change the Theme for Workbook in Microsoft Excel.