我的回答:
Dim k As Integer
Private Sub Command1_Click()
Dim ob As Control
For Each ob In Me.Controls
'If TypeName(ob) <> "CommandButton" Then ob.Enabled = False
If ob.Name <> "Command1" Then
If k = 1 Then
ob.Enabled = False
Else
ob.Enabled = True
End If
Next
k = -k
'Command1.Enabled = True
End Sub
Private Sub Form_Load()
k = 1
本文转自9pc9com博客,原文链接: http://blog.51cto.com/215363/911071 如需转载请自行联系原作者