如何在excel中快速插入或添加多个复选框
时间:2023-04-26 01:11:43
本文将讲述如何在excel中快速插入或添加多个复选框。如何在Excel中的一个单元格中添加一个复选框。如何在Excel中使用“填充句柄”或“VBA宏”添加多个复选框。
在一个单元格中添加一个复选框
如果要在单元格中添加一个复选框,可以按以下步骤执行:
1#选择开发工具选项卡,然后单击控件组下的插入命令,选择复选框。
2#单击要插入复选框的一个单元格。它将出现在那个单元格中。
3#您可以移动光标将复选框拖动到所需位置。
使用“填充句柄”插入多个复选框
如果要在Excel中快速添加多个复选框,可以使用“填充”手柄根据已创建的一个复选框创建多个复选框。请参阅以下步骤:
1#如上所述插入一个复选框
2#将复选框移动到单元格中,然后选择该单元格,将自动填充手柄拖动到要填充的单元格区域上。
3#您将看到每个单元格中添加了多个复选框。
使用VBA代码插入多个复选框
您还可以编写新的Excel VBA宏快速添加多个复选框,只需执行以下操作:
步骤1:打开您的Excel工作簿,然后单击开发工具选项卡下的“Visual Basic”命令,或者只需按“ALT + F11”快捷方式。
步骤2:然后将出现“Visual Basic编辑器”窗口。
步骤3:单击“插入” – >“模块”以创建新模块。
步骤4:将以下VBA代码粘贴到代码窗口中。然后单击“保存”按钮。
Sub addMultipleCheckBoxes()
On Error Resume Next
Set wr = Application.Selection
Set wr = Application.InputBox("Select one Range that you want to add checkbox in:", "addMultipleCheckBoxes", wr.Address, Type:=8)
Set wsheet = Application.ActiveSheet
i = 1
For Each R In wr
With wsheet.CheckBoxes.Add(R.Left, R.Top, R.Width, R.Height)
With Selection
.Characters.Text = R.Value
.Caption = "Check Box" & i
i = i + 1
End With
End With
Next
wr.ClearContents
wr.Select
End Sub
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
PPT制作高级渐变色 PPT如何制作高级渐变色
![](https://img.aspxhome.com/file/2023/10/a352694_0s.jpg)
Win7电脑闹钟怎么设置?
![](https://img.aspxhome.com/file/2023/5/a314289_0s.png)
苹果Mac Safari下载文件没有反应如何解决?
![](https://img.aspxhome.com/file/2023/8/a208858_0s.jpeg)
Win7家庭版升级旗舰版失败是什么问题导致的?
![](https://img.aspxhome.com/file/2023/26/a228690_0s.png)
pr初学者教程:认识软件的操作区域、剪辑视频
![](https://img.aspxhome.com/file/2023/3/a202573_0s.png)
Excel CHAR 函数 使用教程
![](https://img.aspxhome.com/file/2023/2/a163272_0s.png)
Win7怎么进入安全模式?Win7进入安全模式的方法
![](https://img.aspxhome.com/file/2023/26/a228394_0s.png)
如何在wps表格中设置文字居中
老电脑怎么装win11系统?老电脑一键升级Win11系统教程
![](https://img.aspxhome.com/file/2023/27/a238604_0s.jpg)
最实用简单的XP系统网络技巧 条条精辟值得收藏
在word中怎样制作灯泡发光效果
Win8.1升级Win10系统提示错误代码0x80070005-0xA0019的故障原因及解决方法
![](https://img.aspxhome.com/file/2023/28/a244614_0s.png)
Windows7系统切换用户的方法
![](https://img.aspxhome.com/file/2023/27/a230754_0s.jpg)
WPS 文字的文字设置详解 WPS字号设置技巧
![](https://img.aspxhome.com/file/2023/6/a187386_0s.jpg)
sihost.exe是什么进程?Win11系统sihost.exe占用大量CPU处理方法
![](https://img.aspxhome.com/file/2023/28/a239063_0s.jpg)
Win10注册表文件损坏怎么办?Win10注册表修复教程
![](https://img.aspxhome.com/file/2023/26/a220923_0s.jpg)
word打字自带下划线怎么取消_word取消自带的下划线教程
![](https://img.aspxhome.com/file/2023/5/a314072_0s.png)
如何使用wps office表格记录单 快速查看、审核数据?
![](https://img.aspxhome.com/file/2023/0/a167940_0s.gif)
windows8系统去除管理员账户密码的方法
![](https://img.aspxhome.com/file/2023/29/a257236_0s.jpg)
excel饼环图是如何制作出来的?
![](https://img.aspxhome.com/file/2023/5/a154895_0s.jpg)