如果你是在写Active x 控件,你可以看看下面的过程,这想是你要的.
Private Sub SetOnlyMe()
Dim tempControl As Control
Dim i As Long
On Error Resume Next
For i = 0 To UserControl.ParentControls.Count - 1
Set tempControl = UserControl.ParentControls.Item(i)
If TypeOf tempControl Is ImageButton Then
If tempControl.Grouped Then
If Not (tempControl Is UserControl.Extender) Then
If tempControl.Value <> 0 Then
tempControl.Value = 0
End If
End If
End If
End If
Next
Err.Clear
End Sub
Private Sub SetOnlyMe()
Dim tempControl As Control
Dim i As Long
On Error Resume Next
For i = 0 To UserControl.ParentControls.Count - 1
Set tempControl = UserControl.ParentControls.Item(i)
If TypeOf tempControl Is ImageButton Then
If tempControl.Grouped Then
If Not (tempControl Is UserControl.Extender) Then
If tempControl.Value <> 0 Then
tempControl.Value = 0
End If
End If
End If
End If
Next
Err.Clear
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货