Ask Your Question

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

asked 2016-03-23 19:36:09 +0200

toneh gravatar image

updated 2016-03-24 14:36:41 +0200

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?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-03-24 15:43:39 +0200

Ratslinger gravatar image

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.

edit flag offensive delete link more


@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."

LKeithJordan gravatar imageLKeithJordan ( 2016-03-24 16:26:01 +0200 )edit

answered 2016-03-24 16:14:12 +0200

LKeithJordan gravatar image

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.

edit flag offensive delete link more


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.

Ratslinger gravatar imageRatslinger ( 2016-03-24 17:16:07 +0200 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-03-23 19:36:09 +0200

Seen: 10,283 times

Last updated: Mar 24 '16