I have hundreds of buttons on a worksheet.
The buttons are labelled for example B12down, B12up, B13down, B13up.... etc.
I only want to select buttons with "down" in the button name. I made some code already, but after selecting one button, upon going to the next button and selecting, the previous selection becomes unselected. Is there a way I can add to the already selected buttons?
Dim wbname As String
Dim button As OLEObject
Dim t As Range
wbname = ThisWorkbook.Name
Workbooks(wbname).Worksheets("Walkthrough").Activate
For i = 9 To 10
For j = 3 To 5
ColumnLetter = Split(Cells(1, j).Address, "$")(1)
Set t = ActiveSheet.Range(ColumnLetter & i)
rng = rng & "," & ColumnLetter & i & "down"
Next j
Next i
L = Len(rng)
rng = Right(rng, L - 1)
Workbooks(wbname).Worksheets("Walkthrough").Shapes(rng).Select
The buttons are labelled for example B12down, B12up, B13down, B13up.... etc.
I only want to select buttons with "down" in the button name. I made some code already, but after selecting one button, upon going to the next button and selecting, the previous selection becomes unselected. Is there a way I can add to the already selected buttons?
Dim wbname As String
Dim button As OLEObject
Dim t As Range
wbname = ThisWorkbook.Name
Workbooks(wbname).Worksheets("Walkthrough").Activate
For i = 9 To 10
For j = 3 To 5
ColumnLetter = Split(Cells(1, j).Address, "$")(1)
Set t = ActiveSheet.Range(ColumnLetter & i)
rng = rng & "," & ColumnLetter & i & "down"
Next j
Next i
L = Len(rng)
rng = Right(rng, L - 1)
Workbooks(wbname).Worksheets("Walkthrough").Shapes(rng).Select