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

  

原文地址:https://www.cnblogs.com/kidoln/p/4503619.html