Classic "+1 increment" question

I’m into playing RPG games and i tend to make Exel sheets to keep track of all the stats
that i developed on every lvl. Recently i thought of modernizing my template file with +1/-1 increment.

I found on the net what i want and my sight is set on Spin Button in Form Controls.
Now there is a tedious part. My template have 50 columns and 70 rows and every cell need this button.
And for every cell i would need to set manually in Data Tab in Properties of each button the linked cell.
that’s 300 buttons to manually set up.

The question is can i make a single one Spin Button that will increase the value of the cell i click on (Active Cell).
Or i could make 2 Push Buttons one for +1 and one for -1 that will work with an Active Cell?
The idea for that came from a forum post i read on open office forum

Can i write some magic thing in Linked Cell in Data tab for it to affect the cell i click on and not the set single cell?

i tend to make Exel sheets

What Excel has to do with LibreOffice? Or do you mean that you use LibreOffice, but for some unclear reason save spreadsheets in one of Excel file formats?

@mikekaganski After almost 20 years of using only MSOffice every calculation form for me is by default Excel sheet. and i started using Libre only this week so all my files i want to use are YES in “.xlsx” format.

I created 2 separate buttons one for +1 and one for -1.
i used the exact macro from link in my question:

Sub activecellplus1

ThisComponent.CurrentSelection.value = ThisComponent.CurrentSelection.value +1

End Sub

I had to change my settings for macro security for it to run but now i have a problem.
I dont know why when i finished editing the push buttons and i deactivated the “Design Mode” in “Form Controls”
My program stops working properly. Whatever context menu i open up with right click shows blank.
The positions are there an i can click them but i don’t see anything.
Same thing happens with all context menus on top File, Edit, View etc.
But when i activate “Design Mode” back ON the issue is gone… and now i cant use the buttons i created.
should i report this as a bug in separate question or something? i literally installed libre one week ago as a substitute for MS Office so i’m new with this program…

And i found the source of my problem… it seems that the issue is only with files that i previously created with MSOffice and now i want to use them as a template for my new work with LibreOffice.
When i created new clean file with LibreOfice there is no issue when i created that push button with macro.
Sad think is that if i ever encounter any of those issued on my other MSOffice files i will have to rewrite them to a new clean LibreOffice file.
I bet this is one of the quirks of changing platforms :smiley: