Morning All,
I have a workbook that I am working on and I have a load of shapes, textboxes and labels grouped together (Group 102) on a sheet (Income) and I would like to hide the group if a cell value or drop down is 1 or show it if it's 2. I have tried many various things that I have found via googling (other search engines are available) but none of them appear to work. The textboxes are from ActiveX Controls and the shapes and labels are created using shapes or text boxes.
An example of what I've been trying to do is below, but it doesn't work
Any suggestions would be appreciated and I'm happy for the code I've given to be scraped if it's no good.
If the self-isolation doesn't drive me crazy it will be the VBA!
Thanks all
Jon
I have a workbook that I am working on and I have a load of shapes, textboxes and labels grouped together (Group 102) on a sheet (Income) and I would like to hide the group if a cell value or drop down is 1 or show it if it's 2. I have tried many various things that I have found via googling (other search engines are available) but none of them appear to work. The textboxes are from ActiveX Controls and the shapes and labels are created using shapes or text boxes.
An example of what I've been trying to do is below, but it doesn't work
VBA Code:
Sub HideUnhideShape()
If Worksheets("Income").Range("AB1") > 1 Then
Worksheets("Income").Shapes.Range(Array("Group 102")).Visible = False
Else
Worksheets("Income").Shapes.Range(Array("Group 102")).Visible = True
End If
End Sub
Any suggestions would be appreciated and I'm happy for the code I've given to be scraped if it's no good.
If the self-isolation doesn't drive me crazy it will be the VBA!
Thanks all
Jon