Excel Macros to Libre Office Macros

Hi there, will need help converting an XLSM file to run using Libre office macros, hope we could get some help.

encountered error
BASIC runtime error.
‘1’

Type: com.sun.star.container.NoSuchElementException
Message:

pointing to this line

csa.Shapes(“Button 129”).Visible = False

Some VBA macros can run in LibreOffice with the Compatibility option.

But better to rewrite all of you VBA macros based on the API and one of the supportesd programming languages. (For example the StarBasic and its IDE).
API: Application Programming Interface.

We can not help you without examining your full VBA code and a sample document where you want apply it.

1 Like

HI there, thanks so much for the idea, how do you run the compatibility option?

Start here - Option VBASupport Statement and follow the links in the Related Topics section

1 Like

I tried to insert the compatibility mode as suggested but i think there are other stuff to do. Is there a way for me to have you check the xlsm file?

I’m sorry, Ryan, but I don’t think there’s anything new to learn from this workbook. Judging by the line you quoted in your question, there are many, many buttons on the sheet in this workbook. And you are trying to show or hide them by a macro according to some condition. Perhaps for you such a construction of the user interface seems good. I’ve seen similar projects, I don’t like them - it’s time-consuming, cumbersome, most often not user-friendly. So no, I’m sorry, I’m not going to watch this workbook.

Perhaps we could help in another way. If you describe the problem that you are going to solve with Calc and ask how to do it in the best way, then we can give recommendations: what tools are best for solving the problem, how these tools are best used.

1 Like

Upload it here. Maybe somebody have some time to examine it.