I am fairly new at macros and still learning syntax for different scenarios.
In my workbook cell A1 is defined as an integer
Dim trialcounter As Integer
trialcounter = Range("A1").Value
there is a button that a user clicks and after every click, the trial counter is advanced by 1
Range("A1").Value = trialcounter + 1
What I would like to do is have five new shapes appear each time the user clicks the button. There is a single button and it needs to unhide the new shapes to the next row. (The circles would be there, hidden, and then when the user hits the button, the next five would appear and so on).
Right now the code looks like this:
ActiveSheet.Shapes("circle_1").Visible = True
ActiveSheet.Shapes("circle_2").Visible = True
ActiveSheet.Shapes("circle_3").Visible = True
ActiveSheet.Shapes("circle_4").Visible = True
ActiveSheet.Shapes("circle_5").Visible = True
But I would like the code to be smart enough to continually advance the circles forward, as there is only one button, and not a new button for each line. and I only want five new buttons at a time, not for all of the buttons to appear on the first click.
Is there a way to name the buttons "circle_trialcounter_1" to "circle_trialcounter_5" or something along those lines? I am really struggling with this problem and would appreciate any help!
Bookmarks