Hi,
I have to do a very repetitive task in 50+ spreadsheets, so I thought: “Why not record a macro?”
So I enabled macro recording (had to install JRE and enable the use in LO) and went to do the tasks in the spreadsheet, and then stopped recording and saving the macro.
Then when closing and re-opening the same file to try the new macro, the results are very strange: it does not ‘do’ what I recorded.
So I tried again, with a new file, recorded just some basic steps to see what the issue is. So this is what my spreadsheet looks like:
19 columns and 3 rows of text and some dates.
What I did:
Tools->Macros → Record Macro
Right-click column C ->Insert colums Left
Right-click column H ->Insert colums Left
Left-click row 1 → Click Bold
Click Stop Recording
Now I save the macro and close the spreadsheet, not saving changes (because I want to test the new macro).
Then I open the spreadsheet again and then:
Tools->Macros->Run macro
I select my saved macro and click ‘Run’
What happens:
2 columns are added at the left side of the spreadsheet, so column 1 and column 2 are added.
Row 1 is not made bold.
When I edit the macro the code is 2849 lines long, which seems a bit excessive to me. I can post it here but I don’t think it will help my case as it probably is too long for anyone to look at.
Clearly I am doing something wrong. I am saving the macro in ‘My macros’->‘Standard’-‘projectname’.
I would be very happy if anyone can tell me what I am doing wrong or what I can check to determine what is going wrong.
Thank you!