答案:Sub EnableAll(Enabled As Boolean, ParamArray objs() As Variant) Dim obj As Variant For Each obj In objs obj.Enabled = Enabled Next obj End Sub 应用: EnableAll True, Text1, Text2, Command1, Command2 文章来自vb爱好者:http://vb.zzzyk.com
Sub EnableAll(Enabled As Boolean, ParamArray objs() As Variant) Dim obj As Variant For Each obj In objs obj.Enabled = Enabled Next obj End Sub 应用: EnableAll True, Text1, Text2, Command1, Command2
文章来自vb爱好者:http://vb.zzzyk.com
上一个:VB编程的一些心得下一个:设置计算机名称