LibreOffice Calc VBA Macro Error - Activate Property Not Found

I’ve recently started using LibreOffice, and for a few days I was able to use Calc to run VBA macros in a .xlsm spreadsheet that was originally created in Excel. However, after a few days I am getting errors on a macro that used to work in Calc. I now get a “BASIC runtime error. Property or method not found: Activate” error message on the “ThisWorkbook.Activate” line of the code below. There is much more code in the macro, but with an error message on the first real line of code with such a basic line of code, it makes me wonder if there’s some sort of global configuration setting that got changed somehow. I have macro security set to Medium and I have enabled macros.

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Complete_button()

ThisWorkbook.Activate
Dim taskName, taskRow, numTasks
Dim dash As Worksheet
Dim data As Worksheet
Set dash = ThisWorkbook.Sheets("Dashboard")
Set data = ThisWorkbook.Sheets("Task List")

If I erase the ThisWorkbook.Activate line, then I get a similar error with the ThisWorkbook.Sheets lines. I’m sure at some point I may need to learn LibreOffice’s own macro language and migrate my VBA macros over to it, but I mostly want to learn why a macro that was working in Calc is suddenly failing to run.

Please upload a real sample fle with the embedded macro code.

Note: the compatibility with the MS VBA is not perfect.
Write your macro based on the LibreOffice API, and use the native ODF file formats.

Does that “complete button” belong to another document? If you click that button and that button belongs to ThisWorkbook, then ThisWorkbook is the active one already.
If that button belongs to a different workbook, what is ThisWorkbook then?
And if I remember correctly, VBA activates a window object, since the same workbook may be shown in multiple windows.

All of the macro’s actions are supposed to operate in the same workbook, so I’m guessing activating the workbook is unnecessary. I can’t remember when I wrote the code for the macro, and it’s possible I copied it from an internet guide somewhere. Anyway, removing the ThisWorkbook stuff and using the code below allows the macro to run without issues or errors in LibreOffice. I’m just confused why LibreOffice previously had no issues with using “ThisWorkbook” stuff in the macro.

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Complete_button()

Dim taskName, taskRow, numTasks
Dim dash As Worksheet
Dim data As Worksheet
Set dash = Sheets("Dashboard")
Set data = Sheets("Task List")
[the macro has more code after this]