View Single Post
 
Old 02-12-2022, 05:49 PM
cybersurfer5000 cybersurfer5000 is offline Mac OS X Office 2021
Novice
 
Join Date: Feb 2022
Posts: 6
cybersurfer5000 is on a distinguished road
Default VBA caption command

Hi.


I want to add 100 to the rectangle (named 'ascore') when clicking the up arrow that's right next to the rectangle (see screenshot). The macro is assigned to the up arrow shape. My VBA code is below. It does not work yet.


Error message when run the code in the debugger:

Run-time error '420'
Object required.



Sub ascoreplus()

ascore.Caption = ascore.Caption + 100

End Sub




Anyone sees where I made a mistake?

Thank you very much in advance!
Sophia
Attached Images
File Type: png Screen Shot 2022-02-12 at 7.43.31 PM.png (18.9 KB, 11 views)
Reply With Quote