【发布时间】:2018-11-09 17:49:31
【问题描述】:
如何使用 VBA 仅在 UserForm1 的 Page1 中计算“复选框”? 下面我的全部在第 2 页和第 3 页中。谢谢。
Private Sub CommandButton1_Click()
Dim cnt As Integer
cnt = Count.CheckBox()
If Me.MultiPage1.Enabled = True Then
Dim ctrl As msforms.Control, cnt As Long
cnt = 0
For Each ctrl In UserForm1.Controls
If TypeOf ctrl Is msforms.CheckBox Then
cnt = cnt + 1
End If
Next
MsgBox cnt
End If
【问题讨论】:
标签: vba excel checkbox userform