Do Microsoft Access VBA "programs" run in Libre Office?

I have several menu-driven Access systems built with Microsoft Access using comprehensive VBA routines. These systems are completely menu-driven and no Access knowledge is required by the user.

Can these systems be operated by Libre Office Base in this same, menu-diven, way?

The simple answer to your question is yes. You can create menu driven systems.

The more complex answer is porting the Access system to Base. While tables should present no big problem, VBA routines (Macros) would be covered through Access2Base and may need some reworking. Forms need to be completely rebuilt from scratch.

@Ratslinger, thanks for the Access2Base link. These comparisons are helpful for newbies like me.

I find it interesting that declaration of an object is a two-step process in A2B, vs. a one-step process in VBA. As a side note, the VBA shorthand for “Forms!myForm!myControl.Visible” at the bottom of the code shown is “me.myControl.Visible” – in VBA, the current form or report can be designated with the prefix “me.”

Based on my own limited experience with LO, the answer is yes, but not without modification. Let me explain.

I have substantial experience with MS-Office and VBA, including developing “menu-driven Access systems using comprehensive VBA routines.” I recently began working with LO as an alternative to MS-Office.

A short while ago, I started working with LO 4.x in Windows 7 and Linux Mint, and I am now working in LO 5.x. Some of the issues I initially experienced are gone, and others seem destined to disappear. I will simply address what I observed a few days ago.

I do NOT want to enable JRE (Java Run-time Environment), yet I want to create and run code for automation and menu-driven processing (as you do). Since Javascript, Python, and Beanshell all seem to require JRE, I decided to try LO Basic on a “simple” VBA routine I wrote for one of the CPE courses I teach. The routine runs behind Excel to create loan amortization tables at the click of a button.

Using LO Calc, I opened an Excel workbook containing the VBA code and saved it to ods format. I then tried to run the code. Most of the code ran, but there were a few errors.

Since I had intentionally used Excel-specific commands in my VBA code, I expected some errors when running in LO Basic. However, only the code designating the active worksheet actually caused the routine to bomb off.

When I rem’d the active worksheet statement, the code ran to completion – albeit with certain spreadsheet cells displaying a particular error code. VBA code such as the message box at the end of the routine ran just fine in LO Basic.

I haven’t had time to research and debug my converted routine for the error code displayed in the spreadsheet cells, but I’m quite sure this will require only minimal effort. However, my test routine involves only a few dozen lines of code. The more extensive code required for “menu-driven Access systems using comprehensive VBA routines” will almost certainly require more extensive debugging effort.

One other note, since we are discussing a migration of Access code to LO Base. I currently refuse to use HSQLDB, since this also requires Java to be enabled. As I understand it, the Firebird database is quite powerful, and is currently available for experimental use in LO. I have not had time to experience the use of LO Base with Firebird, but it is definitely on my list of things to do.

I hope this answer gives you some insight into what you may be facing in your quest to use Access code in LO Base. I would encourage you to persevere, and I would love to be kept informed of your progress, since your experience might also help make me aware of problems I may face and the workarounds you have found.

Good luck.

Please click the checkmark next to the post you believe best answers your question.

Just a quick comment on DB’s. There is a variety of choices. Currently I use MySQL & MySQL Workbench or Workbench (depending on the DB I’m using) & have used others. OS - Xubuntu & Mint.