作者:乔山办公网日期:
返回目录:excel表格制作
1:在第一个单元格7a64e78988e69d83333插入复选框后拖动复制。
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
你的不是复选框
是数据有效来性
选中需要设置的列
数据——数据有效性
允许内 选择序列
来源源 输入张三,李四,王五(每个关键词用英文的逗号隔开)
确定
至于后面的相关数据会出来zhidao,是因为他另外有一个信息源,用函数引过来的