【发布时间】:2017-07-11 12:51:03
【问题描述】:
我在 excel 中创建一个宏来按单元格处理单选按钮,在调试和逐步进行的同时,代码似乎每次都忽略了我的单选按钮是否为真。任何指针将不胜感激!到目前为止,这是我所拥有的:(补充一点,我在多个单元格中有单选按钮,我在此处更改了代码,以便可以在单个单元格上进行测试)
Sub RadioController()
Dim total As Integer
Dim pass As Integer
Dim fail As Integer
Dim rng As Range, cell As Range
Set rng = Range("L4")
For Each cell In rng
If radYes = True Then
pass = pass + 1
total = total + pass
Else
fail = fail + 1
End If
Next cell
Range("K4") = total
End Sub
【问题讨论】: