Hello,
I have a button linked to a macro to toggle hide / show around 15 grouped shapes. I can achieve the effect I want by grouping all the shapes together as one group and then using that group name in the code, however, some shapes are set to move and others not move with cells, so it would be better to have all the groups independent of each other.
I tried to get the toggle effect using the group names (each group is named "Instruction1", "Instruction2", "Instruction3:, etc.) by using the wildcard aasterisk "*" as follows:
to hopefully select any group beginning with "Instruction" and then any number after it, but this doesn't work. Any ideas how to achieve this, please?
Thank you!
I have a button linked to a macro to toggle hide / show around 15 grouped shapes. I can achieve the effect I want by grouping all the shapes together as one group and then using that group name in the code, however, some shapes are set to move and others not move with cells, so it would be better to have all the groups independent of each other.
I tried to get the toggle effect using the group names (each group is named "Instruction1", "Instruction2", "Instruction3:, etc.) by using the wildcard aasterisk "*" as follows:
VBA Code:
Sub Toggle_Help_Shapes_Portfolio()
ActiveSheet.Shapes("Instruction*").Visible = Not ActiveSheet.Shapes("Instruction*").Visible
End Sub
to hopefully select any group beginning with "Instruction" and then any number after it, but this doesn't work. Any ideas how to achieve this, please?
Thank you!