Reputation: 5471
I have three buttons in my Excel spreadsheet called Button_01
, Button_02
and Button_03
.
Now, I want to select all of them and tried to go with the following VBA:
Sub Select_Objects()
Sheet1.Buttons("Button_01").Select
Sheet1.Buttons("Button_02").Select
Sheet1.Buttons("Button_03").Select
End Sub
This VBA only selects each of the buttons one after another so in the end only Button_03
is selected.
What do I need to change in this code so all three buttons remain selected.
The same if I would select them manually with Ctrl
?
Upvotes: 0
Views: 145
Reputation: 1090
Try this one:
Sheet1.Shapes.Range(Array("Button_01", "Button_02", "Button_03")).Select
Hope it helps
Upvotes: 1