乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > Excel如何批量插入复选框?(excel插入复选框)

Excel如何批量插入复选框?(excel插入复选框)

作者:乔山办公网日期:

返回目录:excel表格制作

1:在第一个单元格插入复选框后拖动复制。

2:如果单元格区域不规则可以用下面代码:

Private Sub AddCheckBoxesInRange()

On Error Resume Next

Dim cell As Range

Dim CurrentRange As Range

Set CurrentRange = Selection

CurrentRange.NumberFormatLocal = ";;;"

Application.ScreenUpdating = False

For Each cell In CurrentRange

ActiveSheet.CheckBoxes.Add(cell.Left, cell.Top, cell.Height, cell.Height).Select

With Selection

.Value = xlOff

.LinkedCell = cell.Address

.Display3DShading = False

.Characters.Text = ""

End With

Next

CurrentRange.Select

Application.ScreenUpdating = True

Set cell = Nothing

End Sub


本文标签:

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网