I have a problem with my code. There is an error written as BOLD characters in the code section.
I have a sheet that I want to change all of my button.caption named btn1, btn2, btn3, btn4, btn5...... so on and so for at least 49 buttons.
Sub ClearAllButtonClick()
Dim btn
If MsgBox("Are you sure you want to clear all check mark?", vbExclamation + vbYesNo, "Uncheck All") = vbNo Then Exit Sub
For Each btn In ActiveSheet.Shapes
If btn.Name Like "btn*" Then btn.Caption = "UNCHECK ALL" '->ERROR I want to change.
Next btn
MsgBox "All check mark are cleared.", vbInformation, "Uncheck All"
End Sub
P.S: Developer Tab -> Form Control -> Button
Bookmarks