Man*_*noj 5 checkbox excel vba excel-vba
我使用以下代码将多个复选框添加到excel表programaticaly:
With ActiveSheet.CheckBoxes.Add(rCell.Left, rCell.Top, rCell.Width, rCell.Height)
.Interior.ColorIndex = xlNone
.Caption = ""
End With
Run Code Online (Sandbox Code Playgroud)
现在我需要一个代码来解析工作表中存在的所有复选框并获取它们的值(true或false)以及它们所在的单元格.这该怎么做?
谢谢...
Sub Add_CheckBoxes()
With ActiveSheet.CheckBoxes.Add(ActiveCell.Left, ActiveCell.Top, ActiveCell.Width, ActiveCell.Height)
.Interior.ColorIndex = xlNone
.Caption = ""
End With
For Each chk In ActiveSheet.CheckBoxes
If chk Then MsgBox "Checked"
Next
End Sub
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30730 次 |
| 最近记录: |