这可能会有所帮助,我记得我经历了同样的事情,却忘记了答案
据我所知,groupname比frames好
- Option Explicit
- Private C As Control
- Private F As Frame
- Private Sub CommandButton1_Click()
- Me.HIDE
- Dim i As Integer
- For Each C In Controls
- If TypeOf C Is Frame Then
- Set F = C
- For i = 0 To F.Controls.Count - 1
- If F.Controls.Item(i).Name = F.ActiveControl.Name Then
- Debug.Print i, F.ActiveControl.Name
- End If
- If F.Controls.Item(i).Value = True Then
- Debug.Print "Value", F.ActiveControl.Name
- End If
- Next
- End If
- Next
- End Sub
|