EXCEL中隐藏与显示分组框

Sub 隐藏()
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
If sh.Type = msoFormControl Then
If sh.FormControlType = xlGroupBox Then sh.Visible = False
End If
Next
End Sub

Sub 显示()
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
If sh.Type = msoFormControl Then
If sh.FormControlType = xlGroupBox Then sh.Visible = True
End If
Next
End Sub

  

posted @ 2015-05-14 16:12  哈度普  阅读(2181)  评论(0编辑  收藏  举报